Collisions with self.name

networnetwor Member Posts: 89
edited November -1 in Working with GS (Mac)
Hi, I need to do this:
I have only one actor in my game call "characters"
--> In this actor I Have:
If self.name = 1 then do something.....

I have names 1-9 ....

I need rule : If self.name= 1 collide with self.name = 2 then do something..... Is it possible?
Hope you can understand ;)
Thanks.

Comments

  • POMPOM Member Posts: 2,599
    It was possible up to 0.92 !
    for some reason they took this ability out!
    in 0.93 we cant use self.name in a rule , sadly.

    roy.
  • networnetwor Member Posts: 89
    What? Why? Omg... I really need it ! :(
  • POMPOM Member Posts: 2,599
    networ said:
    What? Why? Omg... I really need it ! :(

    I know , me too.
    i hope they will bring it back in the FIX update

    Roy.
  • networnetwor Member Posts: 89
    Do you know when will be fix update?
  • POMPOM Member Posts: 2,599
    I wish i did mate , TSB said the fix is in the hands of QA so im hopping soon

    Roy.
  • networnetwor Member Posts: 89
    Ok, I wrote this question to User support. I hope they will bring it back :)
  • POMPOM Member Posts: 2,599
    networ said:
    Ok, I wrote this question to User support. I hope they will bring it back :)

    Great , please post here if they reply to you !
    Cheer up ! check out my new game for iPad: http://gamesalad.com/forums/topic.php?id=23586
    ;)

    Roy.
  • networnetwor Member Posts: 89
    Ok, I post it here if they respond :D
    Your games are great I tried Loonimals and its really nice and smooth playing. Congrats!
  • calvin9403calvin9403 Member Posts: 3,186
    it works for me though

    _______________________________________
    http://www.gamesaladforum.com/
  • POMPOM Member Posts: 2,599
    Sorry mate i made a mistake , self.name do work
    Its self.image that doesn't work.

    Roy.
  • calvin9403calvin9403 Member Posts: 3,186
    ya self image is not working
  • networnetwor Member Posts: 89
    So, How can I make rule like this?
    If sef.name = ball collide with self.name = wall
    Then do something...

    Thanks.
  • simo103simo103 Member, PRO Posts: 1,331
    I don't think you can do that (ie: self refers just to the actor in which the rule is contained so the ball actor can't know the wall actor has a self.name). That is why Game attributes are used (ie: to write self attributes to a game attribute so other actors can access them)

    Can it just do a normal collide? Or you will need to set a Game attribute that takes the self.name and then compare it in the ball actors rule.
  • networnetwor Member Posts: 89
    I need 9 different types of "blocks" - but they must be all in 1 actor. So, I want to do this way:

    If self.name = red_block then
    Change image to red.png .....and do something....

    If self.name = yellow_block then
    Change image to yellow.png .....and do something....

    And then I need rule like this:
    If red_block collide with yellow_block
    Then do something.....

    Is it possible? i hope so.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you can still MAKE a self attribute though. Use the same block and give each one a self attribute number 1-9. then when actor collides and self attribte number =1 do this, if self attribute number =2 do that, ect
  • networnetwor Member Posts: 89
    Thanks!
Sign In or Register to comment.