help with character changing
Displaying 1-9 of 9 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
eltimo

If i type this code like it is in the manual (obviously changing the names of the character files:
int currentplayer=entitySpawn(10,10,"Darin.chr"); 
changeChr(currentPlayer, "Charin.chr");

Surely it should change the chr when this line of code is inserted. But....

instead it makes a second character that doeant do anything at all
00
?

Posted on 2006-03-04 16:11:19

eltimo

Can't help noticing that noones awnsered this, 2nd day running!

Posted on 2006-03-06 14:04:35

mcgrue

It should work. This is how Darin gets his outfit changed in the fashion institute in Bumsville, after all.

Have you tried verifying that the second CHR is properly formed?

Posted on 2006-03-06 16:17:56

Interference22

Quote:
Originally posted by eltimo

Can't help noticing that noones awnsered this, 2nd day running!



McGrue put's it perfectly: you didn't get an answer because everyone's scratching their heads. The code you posted should work just fine. If it doesn't, we have a problem.

Posted on 2006-03-06 19:47:44

eltimo

well it doesnt at the moment, I can't work out whats wrong with it. Verge runs the code but you get another character that has no purpose in life. Thanks anyway

Posted on 2006-03-07 13:21:02

Kildorf

Wait uh... I think I may see what's wrong.

The first line of code is only there to create an entity for the second line to change. Take out the first line, and change "currentPlayer" in the second line to whatever variable you're storing your player's entity in.

Does that make sense?

Posted on 2006-03-07 17:43:55

eltimo

Yep that works thanks Kildorf. *phew* I was beggining to get worried that there was some serious shit up with my code. Thanks!

Posted on 2006-03-08 12:10:30

Kildorf

Heh, no problem. Glad I could help.

Posted on 2006-03-08 17:15:37

rosh.r03

i have the same problem i understand most of what you said but if you take out the first line wouldn't the mean that the script wouldn't work? And where would the player be stored in a variable? Is that like ..... Darin.MAK or Darin.PCX or Darin.VC (Or what ever)

Posted on 2006-06-22 04:25:57 (last edited on 2006-06-22 04:27:21)


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