Support with Left and Right Spell
butterbean
Member Posts: 4,315
So with the new viewer, and iphone touch controls, I've run into an inconsistency with the left and right spell.
So before the ipod touch controls were implemented:
In my main actor I had the rule (with boolean self attribute: Self.facing left)
When self.facing left is true:
Spawn actor: Left Spell for 1 second animate etc..
Same thing in the main actor with right spell:
When self.facingleft is false:
Spawn actor: Right spell for 1 second animate etc.
How would I implement itouch controls. I only want one shoot button for the spell.
Do I have to add 2 global game attributes called left and right spell, and have the button check that they are true to spawn spell?
Any help appreciated!
So before the ipod touch controls were implemented:
In my main actor I had the rule (with boolean self attribute: Self.facing left)
When self.facing left is true:
Spawn actor: Left Spell for 1 second animate etc..
Same thing in the main actor with right spell:
When self.facingleft is false:
Spawn actor: Right spell for 1 second animate etc.
How would I implement itouch controls. I only want one shoot button for the spell.
Do I have to add 2 global game attributes called left and right spell, and have the button check that they are true to spawn spell?
Any help appreciated!
Comments
On your spawner,
If LeftSpell is true AND Fire is true -> spawn the left spell
If RightSpell is true AND Fire is true -> Spawn right spell.
I set the Fire Button actor to the rules above:
When touch is pressed, set fire to true
When touch is released, set fire to false
Also, in my main actor where the spell is spawned:
I set for Right Spell (Self.facingleft is a boolean attribute telling her where she's facing)
When self.facingleft is false ; When Game.fire is true
Spawn Spell
For Left Spell
When self.facing left is true; When game.fire is true
Spawn Spell
The spell button is very inconsistent, and if anything, it doesn't work at all....
Worked perfect when I had the keyboard controls in there before I changed them over to iphone controls.
Anything I could be doing wrong here?
Also, here's a link to one of the right spell rules that is under the main actor
http://img85.imageshack.us/img85/376/picture1nx.png
http://gamesalad.com/game/play/23210
Though is it inconsistent when you are tapping the fire button? Because there is a 1 second delay when the spawn actor is kicked off. So if you tap fire, nothing will spawn until after the first second.
holding down does work! Thank you
is there a way to get it to work better without holding the button down, and just tapping the button?