PLEASE HELP

iWiniWin Member Posts: 334
edited November -1 in Working with GS (Mac)
Hello, i was wondering if anyone could help me out in a problem im having..My game has some power ups where if my plane catches the power up then hes able to activate it. I have it set where when he touches it the power up goes away and he has to wait for the second one to come. My problem is when the second one comes and my plane catches it, the power up gets destroyed right away with no touches.

For my power up actor i have the rule

When actor touch is pressed
Change attribute game.bomb to true

When actor touch is released
Change attribute game.bomb to false
Destroy this actor

Thanks

Comments

  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    I am new too, so I can't help, but a "please help" title is not really smart.
    If everybody writes "please help" for every problem, we will have only "please help" topics in the forum.

    I for my part will ignore these from now on.
  • harrioharrio Member Posts: 234
    what's cookin,

    are the power-ups based on the same actor or different actors? if they are the same, i think you have to set game.bomb back to true after you destroy the actor otherwise it stays false and every one that is spawned after it will be immediately destroyed because game.bomb is still set to true.

    hope that helps...

    noodles...
  • rebumprebump Member Posts: 1,058
    Not sure I totally understand your issue but if I do...

    ...have you used both the "touched" and "inside" in a single rule to activate grabbing a piece and destroy after setting whatever tracking variable you use. Then when the next one comes, just do the same thing again? I am pretty sure that works.

    Also, you can create a game attribute called "PlayerBombPieceCount" (or something) that is an integer. Then when they touch a power-up bomb item/piece, you increment that attribute by one. Then if they need two before they can use the bomb (maybe they are collecting pieces or can only launch in pairs?), you can have a rule of "if PlayerBombPieceCount % 2 = 0 then allow bomb use."

    It still may be doable that way if only a given "set" of pieces are available per scene or something. If the pieces look/act different or are in completely different scenes, then you may need to define some reset points so they don't collect bomb piece A twice or bomb piece A in one scene and another bomb piece elsewhere. Or if the logic is just that, then a more complex bomb requirement method may be needed.

    Just some ideas coming from the perspective of not really knowing exactly your issue. (gee, thanks you say! :-) )
Sign In or Register to comment.