Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Racing

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Pako the True G
pako




Joined: 26 Mar 2005
Posts: 184
Location: Bleh-ville

PostPosted: Sat Oct 22, 2005 3:17 pm    Post subject: Racing Reply with quote

Is there anyway you could make a race between the hero and a NPC to a particular point(finish line), and have it return results like if you lost or won?
_________________
Image and video hosting by TinyPic
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Gizmog1
Don't Lurk In The Bushes!




Joined: 05 Mar 2003
Posts: 2257
Location: Lurking In The Bushes!

PostPosted: Sat Oct 22, 2005 8:02 pm    Post subject: Reply with quote

Yeah, very easily. Have a for loop counting upwards, and have a while loop going that's checking to see when the Hero or NPC are above or below a certain point. When their X/Y position gets to the right amount, meaning they're past the finish line, have it set a variable (Player Time, OpponentTime) to the number the counter was at. That'd be accomplished by "Setvariable (PlayerTime,RaceTimer). Then have it wait for the other person to cross the line, get their time, and whichever time is smallest wins.
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group