Posted By
|
Message
|
Cecilectomy noPE
Registered 19/03/2005
Points 305
|
8th March, 2009 at 23:18:00 -
im not experiencing the problem you say is happenning. when i hit a zombie in the head only that zombie bleeds and dies. although some zombies when hit DONT bleed and just freeze in place.
if you dont figure it out ill trove through your code. it seems a bit complicated and i have not used the PMO (always code my own platform movement) so i will see what i can understand.
Edited by Cecilectomy
n/a
|
0ko
Registered 11/01/2009
Points 318
|
9th March, 2009 at 02:06:47 -
why can't you just use say,an object named "variables" have it so,if bullet collides with zombie head set alterable value a of "alterable values" to 1 (or you could use flags)
and in the behaviors event editor for the head have it so if alterable value a of the object called variables = 1 the destroy head.
then,if no zombies (group.1 or enemies) are on screen,set alterable value back to 0.
I don't know,maybe I just don't understand the problem.
Edited by 0ko
n/a
|
Chloe Sagal under the influence of FUN
Registered 19/02/2009
Points 607
|
9th March, 2009 at 16:23:28 -
Originally Posted by Cecil im not experiencing the problem you say is happenning. when i hit a zombie in the head only that zombie bleeds and dies. although some zombies when hit DONT bleed and just freeze in place.
if you dont figure it out ill trove through your code. it seems a bit complicated and i have not used the PMO (always code my own platform movement) so i will see what i can understand.
yeah, thats basically what it does, but when you shoot that zombie and the head dissapears, then it actually kills off another zombie, possibly off the screen, keep an eye on the number of objects, it starts at like 49, then every five on that is another zombie, so about 54. if you get something like 53 or 58, then theres a zombie stuck without a head an needs to be shot.
Originally Posted by Cecil why can't you just use say,an object named "variables" have it so,if bullet collides with zombie head set alterable value a of "alterable values" to 1 (or you could use flags)
and in the behaviors event editor for the head have it so if alterable value a of the object called variables = 1 the destroy head.
then,if no zombies (group.1 or enemies) are on screen,set alterable value back to 0.
I don't know,maybe I just don't understand the problem.
hell, i dont even understand it, every method listed here should work, but it dont.
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
|
Cecilectomy noPE
Registered 19/03/2005
Points 305
|
9th March, 2009 at 17:51:04 -
wtf? how did that quote from me? the second one. i didnt say that lol.
n/a
|
0ko
Registered 11/01/2009
Points 318
|
9th March, 2009 at 18:08:08 -
cecil! how dare you get credit for my post?!
oh and chloecakes,could you post an example file of it not working so I can try out my idea?
also if there's a still live headless zombie on screen,just set it up so if head isn't overlapping zombie,destroy zombie.
Edited by 0ko
n/a
|
Chloe Sagal under the influence of FUN
Registered 19/02/2009
Points 607
|
9th March, 2009 at 19:08:22 -
oops! i forgot to change the name, i usually just quote one and copy the quote code then change the name, i just forgots. my bad!
@oko - i sent you the file in a pm
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
9th March, 2009 at 19:23:00 -
I think i know your problem, i had that problem aswell with multiple objects, there is a simple solution to it. It's not a solution but more of a guideline when using fixed values.
You have two objects. Zombie and Head. So basicly, when comparing fixed value, if you need to give actions to both objects in a same event.
Do this:
When you create a zombie, give to the head fixed of zombie in an altval.
And to check anything you need use this as condition, then you can give actions to both objects without any more conditions.
Zombie fixed = althead?
althead = zombie fixed?
and thats it.
Code me a sausage!
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
9th March, 2009 at 19:25:49 -
Go on then, send me the source too
I'm bored enough right now to take a look
n/a
|
Chloe Sagal under the influence of FUN
Registered 19/02/2009
Points 607
|
9th March, 2009 at 19:52:38 -
Originally Posted by Don Luciano I think i know your problem, i had that problem aswell with multiple objects, there is a simple solution to it. It's not a solution but more of a guideline when using fixed values.
You have two objects. Zombie and Head. So basicly, when comparing fixed value, if you need to give actions to both objects in a same event.
Do this:
When you create a zombie, give to the head fixed of zombie in an altval.
And to check anything you need use this as condition, then you can give actions to both objects without any more conditions.
Zombie fixed = althead?
althead = zombie fixed?
and thats it.
thats actually the way that i had it set up at first. maybe its possible that i should check it both ways like you have here and see if that works.
@sketchy - i sent you the file too.
thanks so much for your help everyone, sorry im such a problem!
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
|
Chloe Sagal under the influence of FUN
Registered 19/02/2009
Points 607
|
9th March, 2009 at 20:23:55 -
alright, peblo touched on it possibly having something to do with the spread values not lining up, and i set up a system that adds to a value everytime a zombie is created, and when the head is created, it sets that value to the zombie and the head copies the value set on the zombie. now, i definatly know for sure that it destroys the correct zombie now, except now it still destroys everyhead, so the bug is obviously in the bullet hits head script, not the actual detection of values. the scipt to start it is just "bullet overlapps head". from there it sets the kill value, creates the blood spot and starts the blood drop loop, then destroys the bullet and the head. ive got a few ideas on how i can fix it, but ive got to head out for a few hours and ill try it when i get back. if anyone gets any ideas please feel free to let me know.
thanks so much guys!
EDIT: nvm i got it! i set the destroy bullet and destroy head to the top of the actions, and it worked! my guess was the bullet was travelling so fast by the time it got around to destroying the head, it didn't know which one to pick! lol. and i thought that putting that at the top would disable the rest of the event? maybe since it was already initiated it cant just cancel it.
P.S. did any one who tested it find the tiny house funny? im going to finish it tonight and post an update. thank you to everyone who helped!
Edited by Chloe Sagal
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
|
|
|