Noob Editor Question - Help get me started... Event Flags

NMansellNMansell Member Posts: 143
edited November -1 in Working with GS (Mac)
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?

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    'Position' is a reserved term in most programming as a reference for the X, Y, or Z axis.

    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
  • NMansellNMansell Member Posts: 143
    thanks, i didn't know that. Having changed it it still does appear to be changing the attribute (I have now set to true/false) upon resizing. It resizes all the way up rather than down?
  • MotherHooseMotherHoose Member Posts: 2,456
    for down-sizing, are using a negative number?

    Change Size -10 ???

    MH
  • NMansellNMansell Member Posts: 143
    yes. -10
  • NMansellNMansell Member Posts: 143
    any suggestions?
  • magic101himagic101hi Member Posts: 713
    is it an integer if so make it a real
  • NMansellNMansell Member Posts: 143
    thanks, but how do i do that? i cannot change the type after it has been set.
  • NMansellNMansell Member Posts: 143
    i have re-created it now as 'real' but it still does the same.
    Here is a screenshot of my setup. PosSize is a 'real' attribute. Default 0

    Image Link:
    http://ipad.netii.net/GameSalad/gamesalad.jpg
  • MotherHooseMotherHoose Member Posts: 2,456
    @NMansell

    I get it to work properly...
    email me and I will send you the demo

    MotherHoose

    gmail
    .com

    MH
  • NMansellNMansell Member Posts: 143
    ok thanks. sent.
  • NMansellNMansell Member Posts: 143
    wanted the latest update so i'm updating now. will let you know. thanks again.
  • NMansellNMansell Member Posts: 143
    all worked. i understand better now. thanks.

    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?
  • NMansellNMansell Member Posts: 143
    to add, i understand that resizer = false then it will increase by 10 but how does it know to decrease, i cannot see that rule?
  • NMansellNMansell Member Posts: 143
    also why didn't it work with mouse pressed, as i only want the event to change the attribute if it is pressed once and not all the time (down)?
  • NMansellNMansell Member Posts: 143
    ignore my last comment - found the 'otherwise rule' LOL
  • MotherHooseMotherHoose Member Posts: 2,456
    good habits when creating for touch devices to use touch... and when creating for mouse devices use mouse
    (both commands work for now...)

    does it work???
    NMansell said:
    to add, i understand that resizer = false then it will increase by 10 but how does it know to decrease, i cannot see that rule?

    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
  • NMansellNMansell Member Posts: 143
    thanks, i have been playing and got a few good varieties of touch boxes showing.

    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?
  • MotherHooseMotherHoose Member Posts: 2,456
    You own your game... you get the profits...

    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
  • NMansellNMansell Member Posts: 143
    my thoughts as well. But do I have to upload to GS site or can I deal direct with Apple Store using Game Salad?
Sign In or Register to comment.