some one help
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
TheMaxx

in my map switch event i have
int save_x,save_y;
void Mapswitch(int x,int y,string fname)
{
save_x=entity.tx[player]; save_y=entity.ty[player];
map(fname);
}
void InitMap()
{
SetPlayer(EntitySpawn(save_x,save_y,"CHRONO.chr"));
}

but when the character is supposed to teleport to
the new variable

e.g
event// 3,Warp Event!
{
MapSwitch(10,10,"inside.map");

}
the character in sted teleports to the variables of the
event initiating the teleport

could some one please help me



Posted on 2001-05-11 23:00:21

TheGerf

OK, I'm not entirely sure how this should work, but I have an idea.
When you use this line:
save_x=entity.tx[player]; save_y=entity.ty[player];
it stores the CURRENT coordinates of the character.
Instead, you should use:
save_x=x; save_y=y;

I'f I'm wrong, sorry... I'm tired.



TheGerf, not just any gerf.

Posted on 2001-05-11 23:11:13

grenideer

you're saving the wrong locations. You can also save a variable for entity.facing in the function, so he starts on the map facing the way you want (useful for going through doors and stuff like that). A lot of people usually include a fade option as well.



Posted on 2001-05-12 00:56:18

jesusfreak

here:

define 2 ints in your system.vc...

int worldx, worldy;

ok, now goto your map switch:

event
{
worldx = 5; /*this is the tile on the new map you want to land in*/
worldy = 6; /* same thing, Y coordinate in tiles though*/
map("thenewmap.map");
}

now, in thenewmap.map's vc file...

event
{
entityspawn(worldx, worldy, "bob.chr");
}


see how that works? !




.|..|-../..|.|../..|-..|\..|-..../...|
.|..|-..\..|.|..\..|-..|/..|-.../-\..|/
\|..|-../..|_|../..|...|\..|-../...\.|\

Posted on 2001-05-16 19:59:02


Displaying 1-4 of 4 total.
1
 
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.