How do I combine 2 actors?

goliathgoliath Member Posts: 1,440
edited November -1 in Working with GS (Mac)
Hello my fellow gamesaladites... quick question...

I want to attach an invisible actor to my main character (for collision detection purposes) and I was wondering if someone could tell me how to do it.

Basically I want the invisible actor to act as a "skin" for the main actor. I hope I am making myself clear.... I am just having some collision issues as my actor overlaps with another actor and he dies automatically even though he gets close but not overlaps....

please help... Im guessing it has to do with self constraints but I figure someone could help me out quicker... thanks again!

Comments

  • synthesissynthesis Member Posts: 1,693
    Easiest way is to set 2 game (or scene) attributes...
    actorChaserX
    and
    actoChaserY

    Then constrain in your original actor those values to the x and y position of your actor.
    Then in you sensor actor...constrain its x and y position to those attributes.

    This will allow the chasing actor to have identical X and Y positions.

    A short cut would be to have the chaser actors constrain its x and y values to the scene.[actor to chase].position.X (or Y) but this requires unlocking the actor.

    Lots of ways to do it...pick the one that works for you.
  • goliathgoliath Member Posts: 1,440
    thanks synthesis! You are always helpful. I found an old tshirtbooth video tutorial so I'll try that as well.
  • goliathgoliath Member Posts: 1,440
    Ok... I have run into a problem.... I thought I did it correct but every time I place the invisible actor over my main character and hit preview, the screen display screws up and will not show the game in action.

    When I take invisible actor away, it's fine.... Anyone?
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Look in your invisible actor for syntax errors... i.e missing parenthesis, commas etc.
  • RevoltingPeasantRevoltingPeasant Member Posts: 33
    I know this is an old thread, but not wanting to clutter up the site, I'll add my problem to this:

    So I have done what was suggested here and it works perfectly:
    one invisible actor doing the collisions and my weirdly-very-unsquare visible actor follows this invisible collider (which has all the movement code..oh sorry, shouldn't mention code on gamesalad;).

    sooo, the problem is that my visible thig is really not square at all so I would need mutiple invisible colliders to form the collision for my visible dude.
    now, of course you will think "just constrain the 2nd invisible one to the first one" or something in that direction, but I cant do that.

    here's why:
    the movement i need is like on ice. press "up" and the actor slowly starts moving up, getting faster and faster. when I press down now, the actor slows down his up movement and after a second or so starts moving downward. and somehow it seems that constrain is just too slow(?) for my needs in this case. although in the preview everything looks great and both invisible actors follow the visible guy perfectly, the underlying collision is very funky - it collides if i'm a few inches away of a wall, moving towards the wall but pressing the movement key in the other direction.

    recap: I move upwards towards the wall, gliding on the ice, but pressing the down button. collision happens about an inch away from the wall - although there is no visible reason for this. and obviously i don't have the invisible colliders set to invisible for testing.

    does ANYONE know what the heck I'm saying?;) and does anyone have a solution for this? please? I'm going crazy!:)

    thank you so much and cheeers!

    RP
Sign In or Register to comment.