Why so many glitches in my project?

ang0005ang0005 Member Posts: 15
edited August 2013 in Working with GS (Mac)
what seems to be wrong with my code now -.-

http://tinypic.com/r/2zji6oz/5

i have an actor that spawns the car(which i want destroyed and this is on) and a bullet actor.
no matter how the bullet touches it it wont destroy!!!!!! why :,(

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Are you 100% sure that rule is in the car actor and the instance in the scene has not had the rules unlocked before that code was added.

    Also and changing of sizes in the billet or car actor going on at the same time?
  • ang0005ang0005 Member Posts: 15
    edited July 2013
    cars are interpolating to a larger size as they move down. is that why?
    and i have a spawner that spawns the cars at random but i have not unlocked it i put it in the normal car actor.

    i noticed nothing i am trying to collide with that car works it just acts as though it didnt touch it :/ even though it clearly di @tenrdrmer
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    If this is colliding with an actor while it's interpolating I think that does not register, can someone confirm that?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    One of the two actors must be moveable to register a collision.
  • ang0005ang0005 Member Posts: 15
    @jamie_c then thats probably why -.-

    @FryingbaconStudios yeh both are moving towards each other it is just the car is also getting bigger as it moves thats maybe why :/
    i didnt know gamesalad couldnt handle that
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Do you have movable checked or are you interpolating the movement. I should clarify one of the actors must have moveable checked. And yes ajusting the size will affect collision area.
  • ang0005ang0005 Member Posts: 15
    @FryingBaconStudios yep both have movable ticked. i dont know what else it could be other then interpolate effects it and doesnt allow it to collide with anything
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    There is a bug in GameSalad where collisions are not detected during size changes. I don't believe it has been solved at this point. Maybe @codewizard can confirm this?
  • HymloeHymloe Member Posts: 1,653
    If this is colliding with an actor while it's interpolating I think that does not register, can someone confirm that?
    Interpolate will mess up your logic. Don't use it with actors that need to detect collisions. (Lame, I know).

    Try using a Change Attribute rule repeatedly (with some sort of timer), to change the size, instead of Interpolate. Then your collisions will work properly.

    These are the sorts of strange illogical things you have to figure out, to make Game Salad work as you'd expect sometimes.

    You'll find that if you turn the Interpolate behaviour off, it'll probably work exactly as you'd want it to right now.

    So to do your resizing, you could try this in the car...

    Timer: Every 0.1 seconds
    Change Attribute: self.Size.Width = self.Size.Width -1
    Change Attribute: self.Size.Height = self.Size.Height -1

    That way, it'll get 1 pixel smaller each 0.1 seconds (therefore, 10 pixels smaller each second). Tweak values to your liking.


  • mataruamatarua Auckland, New ZealandMember Posts: 854
    You can not interrupt a interpolation in progress - with something I did today I was interpolating the camera and half way through the interpolation I did a change attribute for .05 of a second but then just carried on it's way - over 1200 pixels apart too. It was quite interesting to watch. I was having issues and did some research - did not find my own answer on here. Had to figure that out myself. But I did find this...

    http://forums.gamesalad.com/discussion/54962/make-your-own-interpolations

    This may help you.
  • -Timo--Timo- Member Posts: 2,313
    they also have to be in the same layer to collide
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    That is why there are different behaviors for movement. If one wants to interrupt a movement use a move or move to behavior.
Sign In or Register to comment.