MapSwitch- Getting the player to spawn where you want on the map
Displaying 21-39 of 39 total.
prev 1 2
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
M_Dragon

Don't you just need to see the system.vc because that's the only file with anything about the code I copied and pasted from JTBM? So I will just send you that.

Posted on 2014-05-28 22:08:56

Kildorf

Yeah, sometimes it's hard to track down an error if you've only got the one file. If I had the whole thing then I could tinker with things, run it, look at error messages, that sort of thing.

But! Maybe looking at system.vc is enough. I took a look and I think your problem is that you want to have your #includes at the beginning of the file... so just move the two #include lines that you have after autoexec() to before it.

Also, you'll want to add

int img_flatblack = NewImage(320,240);
int img_flatwhite = NewImage(320,240);


before the autoexec function as well.

Give that a try!

Posted on 2014-05-29 03:19:46

M_Dragon

It still says "error! setDefaultPlayerCHR() is not a valid keyword or identifier!" Is the problem in mapswitch.vc and transitions.vc?Because those are blank.

Posted on 2014-05-29 20:09:08

Kildorf

Aha! That would be the problem then. There's nothing special about those names -- what #include does is it goes and grabs that other file and includes it into the current file so you can access any functions defined in it.

Grab the mapswitch.vc and transitions.vc files from JtBM and replace your blank ones with them. Sorry for the confusion!

Posted on 2014-05-30 04:39:20

M_Dragon

Ok, I will try that, thanks!

Posted on 2014-05-31 02:35:42

M_Dragon

It WORKED!!!!!!!!!!!!! Thank you so much Kildorf!!!!!!!!!!!!!!!! Now I can continue working on The Phantom's Castle!!!!!!!!! Man I love these forums!!!!

Posted on 2014-06-04 23:26:34

M_Dragon

Hmmm. This is what I have for the mapswitch function but it doesn't seem to be working.


 void MapSwitchThree()
{
	Switch("xermasworld.map",20,8,"R",TRANS_FADE);
}

Posted on 2014-07-30 22:46:25

M_Dragon

The error says expecting and int, but the string expression, " ", was found instead.

Posted on 2014-07-30 22:55:52

Chark

This is what i used for mapswitch.

void NorthZoneToMumjarSea()
{
	mapswitch("island.map", 0, 7, "R", TRANS_BOX);
}


Now I use the V1 rpg library so its. 

void NorthZoneToMumjarSea()
{
	SetFaceMidWarp( FACE_RIGHT );
	V1_MapSwitch( _map_MumjarSea, 0, 7, TBLACK);
}


In the sytem file I put:

string _map_MumjarSea   = "island.map";

to identify the map.

Posted on 2014-07-31 18:22:21

M_Dragon

Thank you for helping, but I need Kildorf's help with this because we have been working this out. It's only because he gave me specific files to put into my game.

Posted on 2014-08-03 16:36:26

M_Dragon

I have the same thing that you do for your mapswitch but I still have the error box.

Posted on 2014-08-15 14:42:16

M_Dragon

This is what I have for my mapswitch function and system.vc mapswitch function.

 void MapSwitchThirtyTwo()
{
	Switch("tombthree.map", 8, 2, "U", TRANS_FADE);
}
-mapswitch

void Switch(string mapname, int x, int y, int face, int trans)
{
	if(trans == TRANS_BOX) {
		BoxOut(14);
	} else if(trans == TRANS_FADE) {
		FadeOut(65);
	}
	mapSwitchT = trans;
	mapswitchX = x;
	mapswitchY = y;
	mapswitchF = face;
	Map(mapname);
}
-system.vc 


and the error box is "Expected and int, but the string expression, "", was found instead."

Posted on 2014-08-18 00:34:08

Chark

In your system.vc add:

string _map_tombthree = "tombthree.map";

then use:


Switch( _map_tombthree, 8, 2, "U", TRANS_FADE );
(make sure this is in the map vc file.)

Not sure if that will work for your issue, but worth a try.

Posted on 2014-08-18 22:54:11

M_Dragon

I will try that but wouldn't I need to do that same thing for every map also?

Posted on 2014-08-20 14:18:53

M_Dragon

I tried it and it said 'expecting a variable or function declaration' in the system vc where i put string_map_tombthree = "tombthree.map";

Posted on 2014-08-20 14:26:26

Chark

Make sure there's a space between string and _map_tombthree. I'm not sure why there is a underscore before _map, but I just use it because that's what I learned from some sample code and it worked.

string _map_tombthree = "tombthree.map";

If it still doesnt work, I suggest using the mapswitch and transition from kildorf's game. (That's what i used before i switched to the V1_rpg library.) Copy those 2 files(mapswitch/transitions) from JourneyToBlackMountain to your main folder, then #include them in your system.vc. Then use something like:

void ZoneToYourMap()
{
mapswitch("yourmap.map", 10, 10, "U", TRANS_BOX);
}

in your map vc file.

I'm still new to all of this myself. I know the forums are rather quiet so trying to help if I can. Good luck.

Posted on 2014-08-20 17:21:06

M_Dragon

That's what I am using, kildorf's files. But they don't seem to be working for me.

Posted on 2014-08-20 19:16:02

M_Dragon

NEVERMIND I FIGURED IT OUT!!!!!!!!!!!!!!!!!!!!!!! THANK YOU SO MUCH CHARK AND KILDORF!!!!!!!!!!!!!!!!!!!!!!! NOW MY GAME CAN PROGRESS

Posted on 2014-08-20 19:32:16

M_Dragon

the only issue is...i have to change 38 more mapswitches

Posted on 2014-08-20 19:33:46


Displaying 21-39 of 39 total.
prev 1 2
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.