Noob Editor Question - Help get me started... Event Flags
NMansell
Member Posts: 143
I have been playing with GS and wanted to create a flag event on my Actor. SO I have the following:
self.position (integer) default = 0
I then create the rules on the Actor:
RULE (ALL)
Actor receives Event - Mouse Button - down
Attribute - self.Position = 0
RULE
(Timer) every 0.5 to completion
Change Size 10
Change Attribute - self.Position = 1
RULE
Actor receives Event - Mouse Button - down
Attribute - self.Position = 1
RULE
(Timer) every 0.5 to completion
Change Size 10
Change Attribute - self.Position = 0
But it is not working- can someone help please. The idea is that it grows and shrinks when I press the mouse on it. How do make it so when I press it like touching the screen as well?
self.position (integer) default = 0
I then create the rules on the Actor:
RULE (ALL)
Actor receives Event - Mouse Button - down
Attribute - self.Position = 0
RULE
(Timer) every 0.5 to completion
Change Size 10
Change Attribute - self.Position = 1
RULE
Actor receives Event - Mouse Button - down
Attribute - self.Position = 1
RULE
(Timer) every 0.5 to completion
Change Size 10
Change Attribute - self.Position = 0
But it is not working- can someone help please. The idea is that it grows and shrinks when I press the mouse on it. How do make it so when I press it like touching the screen as well?
Comments
change the name of that attribute to Place...
also if you only have 2 states for that attribute (1 or 2, off or on, yes or no, true or false) then you should have a boolean type attribute instead of an integer type.
hope this helps...
MH
Change Size -10 ???
MH
Here is a screenshot of my setup. PosSize is a 'real' attribute. Default 0
Image Link:
http://ipad.netii.net/GameSalad/gamesalad.jpg
I get it to work properly...
email me and I will send you the demo
MotherHoose
gmail
.com
MH
just out of interest can i create two different boxes and use the same rule for each (export/import) but say link it to an attribute that sets the box. Say Box1 = true, then it will change the image to Box1Turned but if Attribute is Box2 then it will use the actor for Box2, etc
Saving me a duplication of all the rules for each of the boxes?
Do you understrand what I mean?
(both commands work for now...)
does it work??? in the otherwise section of that rule... is the code...sorry if it didn't show open in the demo...
EX: touch is the event that you want the Rule to act on... you only need one rule for that...
the boolean is either/or so 1 Rule with an otherwise clause.
you can change almost all of the attributes on an actor... images, rotations, size, coloring, etc.. just make sure you let the OS know what you want to happen when an event is initiated. Try these things out for yourself...
MH
Thanks for all your help.
I want to begin to start making flash card games for my kids then onto Game & Watch type games. It would be nice to sell on AppStore but wanted to get to grips with the editor first. Although GS hasn't released notes on the iPad developer kit yet. I assume I update my apps to the GS site and they can do the rest if I also join the Apple developer program. Do GS own my game/app then and take a profit?
the iPad you develop the same as the iPhone... just select the format on your Home page in the GS Editor.
I would join Games Salad and wait till you are ready for the Apple Developer membership.
Enjoy!
MH