Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How Do You Tell a Process to Quit
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hello




PostPosted: Tue Jun 03, 2003 2:57 pm   Post subject: How Do You Tell a Process to Quit

we have enemies with a process and a corresponding proc that draws it
our collision detection is in the proc and when the proc quits
we want the process to quit also and not keep on running

example:

process enemy1(aa,a...)
position of enemy changes

end enemy1

proc enemydraw
draw enemy
collision detection then quits
end enemydraw

we want the proc to somehow tell the process to quit also at tge time of collision detection
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Tue Jun 03, 2003 3:39 pm   Post subject: (No subject)

return will end the process
naoki




PostPosted: Tue Jun 03, 2003 9:54 pm   Post subject: (No subject)

return was tried, but it either didn't quit properly or it quit a huge chunk of the game

the point is that there are still things that run because of that fork, and if we destroy it we might not be able to retrieve that info or call it again.

i'll try and tell you later.
void




PostPosted: Tue Jun 03, 2003 10:10 pm   Post subject: (No subject)

hmmmmm...im not sure...but i would prolly use this method:
create an integer (switch) and give it a 0 value....and when the proc quits....make the variable equal to 1..and where ever you tell your process to be forked make it an if statement
if switch =0 then
fork process
end if
and whenever the collision occurs make switch:=1...that should work...but if this is like a shooting game...then u might wanna reset the variable switch every time you shoot...i dunno if this helps...i'll do some reaading on procedures (my CS teach has the books)....and ill respong ASAP....
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: