1 registered members (BrainSailor),
862
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
play again.. help!
#249862
02/04/09 17:35
02/04/09 17:35
|
Joined: Nov 2008
Posts: 42 Philippines
gagamBRYAN
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 42
Philippines
|
hi everyone, there is something wrong with my game. All the game would probably have the "play again?" message with a yes or no button, asking if you are going to play the same game or not.. Now my problem is that the play again function don't work. i just point it to the SAME function that the game uses the first run,. but the problem is that it just load only the entities and no action at all.. what should i do? tnx.
Secrets are stolen from deep inside..
|
|
|
Re: play again.. help!
[Re: Kaizen_31]
#249876
02/04/09 18:26
02/04/09 18:26
|
Joined: Nov 2008
Posts: 42 Philippines
gagamBRYAN
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 42
Philippines
|
it's a to0 long code bro,. hehe.. but the thing is that it works on the first run of the system, i just point it in the same function, but it doesnt work. algorithm is like below:
function playagain() {
laod_entity(); }
action move() { ......ent_animate
if enemy or player' health==0
ent_animate(death)
playagain();
}
function load_entity(){
ent_create("player.mdl", vector(0,-100,-10),move);
}
Secrets are stolen from deep inside..
|
|
|
Re: play again.. help!
[Re: Kaizen_31]
#250115
02/05/09 23:44
02/05/09 23:44
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! There is a mistake function playagain() { laod_entity(); } laod should be load Is that the problem? Ottawa
|
|
|
Re: play again.. help!
[Re: Ottawa]
#250134
02/06/09 04:41
02/06/09 04:41
|
Joined: Nov 2008
Posts: 42 Philippines
gagamBRYAN
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 42
Philippines
|
no bro, sorry its my bad.. its a typographical error. ahehe ahmm.. can you help me make an algo for the play again?.. or conditions and looping that u r using,. maybe i can apply that in my game.. thanks!
Secrets are stolen from deep inside..
|
|
|
Re: play again.. help!
[Re: gagamBRYAN]
#250152
02/06/09 08:58
02/06/09 08:58
|
Joined: May 2008
Posts: 331 Lithuania, Vilnius
Jaxas
Senior Member
|
Senior Member
Joined: May 2008
Posts: 331
Lithuania, Vilnius
|
first of all, you should load same level again if you want to play again, i think. But i don't understand what exactly you want to do..
The smaller the bug, the harder it is to kill. _________________________________________ Forklift DEMO (3dgs)
|
|
|
Re: play again.. help!
[Re: Jaxas]
#250197
02/06/09 15:33
02/06/09 15:33
|
Joined: Nov 2008
Posts: 42 Philippines
gagamBRYAN
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 42
Philippines
|
ahmm.. what i want to do is to re-load again the entities and all the actions and animations.
Secrets are stolen from deep inside..
|
|
|
Re: play again.. help!
[Re: gagamBRYAN]
#250199
02/06/09 15:36
02/06/09 15:36
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
hmm... you can kill all running functions with proc_kill(16); and then just call your main function again and the game should restart.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: play again.. help!
[Re: WretchedSid]
#250210
02/06/09 15:58
02/06/09 15:58
|
Joined: May 2008
Posts: 331 Lithuania, Vilnius
Jaxas
Senior Member
|
Senior Member
Joined: May 2008
Posts: 331
Lithuania, Vilnius
|
maybe you store your player position and load level and place him in that position and as i said, you don't describe the situation..
The smaller the bug, the harder it is to kill. _________________________________________ Forklift DEMO (3dgs)
|
|
|
|