In response to LordAndrew
|
|
what should i put in etc?
|
In response to Thedeadwarrior123
|
|
Whatever it is you want to happen to players when they die, which I suspect is along the lines of...
mob/player |
In response to LordAndrew
|
|
that seems fine, the only problem is the lives. I really wouldnt know how to code it.
|
In response to Thedeadwarrior123
|
|
What do you mean? How did you want to set lives up?
|
In response to LordAndrew
|
|
I just had a thought... maybe lives can be a proc that counts the number of times the deathcheck proc is used. Then when it exceeds lets say 20 then it goes to the game over proc and viola!!!!!
|
In response to LordAndrew
|
|
chck my last reply
|
In response to Thedeadwarrior123
|
|
the only problem is i dont know how to program that.
|
A procedure to do this wouldn't especially be helpful, since you still need to store somewhere in a variable how many times you've died. Of course, modifying my previous snippet to count deaths, rather than lives, is rather easy.
#define MAX_DEATHS = 20 |
In response to LordAndrew
|
|
EUREKA!!! It works. Now i just have to make spawn points for players and mob/enemies?
|
In response to Thedeadwarrior123
|
|
Yep.
|
Actually, for static screens such as game over, an object on the map might work a bit more efficiently than client.screen objects.
|
In response to LordAndrew
|
|
wait wait for some odd reason it says: 12: error: missing left hand argument to =. What does that mean???
|
In response to Thedeadwarrior123
|
|
Whoops! I messed up the #define. It should just be:
#define MAX_DEATHS 20
Without the = sign. |
In response to Solomn Architect
|
|
how exavtly would i do that?
|
In response to LordAndrew
|
|
it seemed to work with = now it says killer is undefined var and ondeath and gameover are unidentified procs
|
In response to Thedeadwarrior123
|
|
For the most part my snippets are just examples, so copy and pasting them probably isn't for the best. You'd have to define OnDeath() and GameOver() yourself. As for the error with killer being undefined, I'm not entirely sure why that'd be cropping up (are you forgetting to specify it in the procedure's arguments?).
#define MAX_DEATHS 20 |
In response to LordAndrew
|
|
Geez, Andrew! Hand out false information to everyone, why don't you! Lol.
Back on topic, make sure the variables and procs you're trying to access are available in the particular scope you're working in. |
In response to LordAndrew
|
|
This seems to work, Thanks.
|
The same concept applies for players really, though for players you'd probably want to create a variable to store where the location of the last save point was, like: