Enemy with multiple parts
fueguito
Member Posts: 15
Hello ALL. Im trying to make an enemy character that has more than one part. For example let’s say the enemy character has a Hat on. I want to be able to hit the enemy a few times then the hat falls off. I know I can constrain the hat to the enemy but here is the problem I will have the same character multiple times on the screen, so 1. how can I put it that after a few hits to remove the constrain from the hat from the enemy, and 2 how can I spawn the same character (enemy + hat) to come out together onto the stage. Or is there a better way than constrain? thank you
Comments
Make an attribute (hits), when hits > 5 then destroy the constrained hat and spawn a new one in its place that doesn't have the constrain behaviour and falls to the ground.
You will need to give each enemy a unique ID, make a game attribute, let's call it 'ID', as each character is spawned it changes the game attribute ID to the game attribute ID + 1 - it then copies this ID to a self.attribute - it (the enemy you have just spawned) then spawns its own hat - and passes its ID onto this hat.
This might help for constrains:
http://forums.gamesalad.com/discussion/62202/linkmachine
That is awesome. Thank you very much
Here's a very very (very) crude example of replacing one actor with another actor that looks the same but has different rules . . .
Pick up the grey block and throw it at the hat, after 3 hits the hat will become loose and fall off . . it looks crap but gives you the basic theory.
Link: https://www.mediafire.com/?365ndbiada9jyqd
Here's a quick (and messy!) example of giving each actor a unique ID . . .
link: https://www.mediafire.com/?zdn53wdrj700owa
That box is hilarious .But its perfect. that really is it, i can do graphics so not a problem for me.
No way can you do graphics better than my 'hat', that's high quality professional graphic design you are looking, I normally charge $400 for a hat like that.
no i was talking about the first one you send with the word HAT! in the box lol
If you made that second one my hats off to you
Here's another method . . . I've just turned the density of the hat up very high, so it takes a few goes to dislodge it . . .
Same deal, pick up the grey block and throw it at the hat . .
Link: https://www.mediafire.com/?7oejbpaqlqdenku
I did it all myself by typing hat into Google.
Yes, that's what I was talking about, $400, actually the text is extra, I'd normally charge $480 for the full package of box + text
thx alot. this is awsome.