|
Post by Prominence on Mar 28, 2005 18:48:11 GMT -5
my ID setup isn't working anymore for killing the single enemy you killed on the overworld. If I don't kill them in sequential order of which they were created, they won't die and it is all reversed!
I'm using a persistent object that saves IDs and destroyes them and such. Can someone help by maybe posting a series of coding for this? I spent an entire saturday on this and now it won't work anymore.
It would help if I could check if there is an instance with a variable and that variable is higher than 0.
|
|
|
Post by shad0w on Mar 29, 2005 2:13:17 GMT -5
In my rpg, i use global arrays for this. I used to think they didn't work across rooms, but they do, so it's a good way to do it.
code:
Set up somewhere
Create: global.killcount=0 global.killed[0]=-1
When you kill a monster:
global.killed[global.killcount]=enemy.id global.killcount+=1
And then do what you will with the ids.
Hope this helps
|
|
|
Post by Prominence on Mar 29, 2005 16:35:53 GMT -5
wow. thanks, with a strategy similar to what you gave I managed to make a better killing system in less than 20 mins.
|
|