Character movement - help me quick!!!
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Petra

Hi guys, I'm just trying to cram in some last minute features before I present a tiny demo of my "project" to the teachers in charge of the senior projects today.
I have 2 questions, one which I might be able to solve because some guy posted a question about how to display text a while ago (but if you could just tell me right off the bat how to do it, that would be great). BUT, my REAL question is: how do I get the characters to move according to user input (i.e. how do I get the character to move when the player pushes the arrow keys)? I've already mastered the "wander box" option in MapEd, but I just don't know how to get it so the character moves according to user input! I read the VergeC readme, and I even copied out the key "flags" index, but I just don't know what to do with it. Please help me, and preferably before 2:30 pm today. Step by step instructions and/or code would be excellent. Thanks so much guys!
:P



Posted on 2001-06-05 10:57:21

Petra

I tried the entityspawn command, but when I try to compile it, it keeps returning an Unknown Token error, and it's really pissing me off royally.
Maybe you can tell me what I'm doing wrong:

event //0 autoexec
{
Palettemorph (0,0,0,0,63)
ent = EntitySpawn (1,2, "Kirinji.chr")
setplayer (ent)
}

Thanks!



Posted on 2001-06-05 11:32:46

rpgking

Did you remember to include semicolons at the end of each line?

Other than that, I don't notice anything wrong with this code block...

-rpgking



Out of clutter, find simplicity. -Einstein

Posted on 2001-06-05 13:05:12

Petra

It still gives me the same error message. I have my Kirinji.chr in the same directory as the compiler, and it just keeps refusing to compile it. I'm writing this command in a map.vc file, by the way. I'm thinking that this is my mistake, but I'm not sure. I have an entity of the same name (and from the same source: character 0 is Kirinji.chr, and I don't know which animation number I should put her on when I use the entity option panel) on the map I want to put my player on - should I delete it?
Any suggestions?
:P



Posted on 2001-06-05 13:53:35

zero

1) make SURE you have the semi-colins(';')
2) make sure that you declaired:
int ent;
in your system.vc
3) yes your code should be in the map.vc



-X3r0-

Posted on 2001-06-05 16:01:23

grenideer

int ent;

event //0 autoexec
{
Palettemorph(0,0,0,0,63);
ent=EntitySpawn(1,2,"Kirinji.chr");
SetPlayer(ent);
}

It has nothing to do with any entities already set through MapEd, which are numbered (0,1,2,etc.). The new entity you spawned is now indexed by ent, and it can be controlled that way. Once you set is as the player, you should control it with the player var instead.
Pay attention to the error messages you get. An unknown token means the compiler is finding something that shouldn't be there (in this case a variable - the compiler doesn't know what it is because you didn't declare it). You also get this error for missing brackets/ punctuation, mispelled function calls, etc.




Posted on 2001-06-05 19:08:45

TheGerf

It doesn't matter if you use repeat characters, I've done it before and it worked fine.

Question, in system.vc, do you have this line?

int ent;

Because if you ever use an int without declaring it in system.vc, Verge won't like you.

As for the code, you need semicolons
event // 0 autoexec
{
Palettemorph (0,0,0,0,63);
ent = EntitySpawn (1,2, "Kirinji.chr");
setplayer (ent)
}

Note: I early versions of Verge2 (This may not apply to you) you cannot have anything immediately after a comment //, you have to have a space. Yet again, early versions.



TheGerf, not just any gerf.

Posted on 2001-06-05 19:14:55


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