Is there a way to constrain an actors distance to another one?
Well this is what i'm trying to achieve I have a main actor, a grenade & a radar. When the actor throws a grenade & if you're to close to it where the blast could kill you (120 px for example) I want the radar on top of the screen to flash like crazy warning you you're in the blast radius of the grenade. I already have the interpolating for the flashing working perfectly & already set the distance from for the grenade & the main actor. I thought it would be an extremely simple thing achieve. I looked at the template from @Braydon_sfx & that's exactly what I'm trying achieve but when I downloaded the template the flashing thing warning you you're to close to an object didn't work & I didn't make any changes to the template. So I was wondering is it possible to change position of the radar on top of the screen to the position of the grande? Or is there a simpler way to fix this? I went to bed really late trying to figure this out then I woke up really early today before school & I just finished my homework then I jumped right onto gamesalad to see if I can figure this out .
Thanks
Comments
You're using PC, correct? I used some new table expressions and functions (I think..It's been a while) which currently aren't available in the Windows Version....
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX so is there another way to do this or I'm I out of luck?
Well, the demo I made that you mentioned was a simple way to use tables to use magnitude with multiple actors, not just one with a pair of variables.
If you have just one object, you could just use the magnitude function to determine the distance between the two objects, then create a rule to trigger something when that distance is a certain value.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@braydon_sfx I followed one of t shirts booth distance from videos. I put the distance in the bomb so that is the distance being measured. So when the main actor is really close it says 50 and when the main actor is far away the bomb says 145 and so on. So what rule should I put in the radar so when the main actor is with in 120 px of the bomb it goes off and when he gets out of 120 px it stop flashing? idk how to archive this
achieve this *
Something like that...
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX the problem is that the distance is a self attribute. So I tried to do something like this. Make a real attribute and I called it SafeFromBlast. So what I did was I went into the main actor and did this
Because I know you can't use self attributes on other things besides the actor you made the self attribute in. So the "Change attribute" was my attempt for the radar to track the position of the Main Actor.
Does this make sense to you?
Okay, that's one work around - though you're going to want to alter the following:
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX Idk it didn't work. Do you think if I follow t shirts video again & I changed the distancrfrom to a game attribute instead of a self attribute it should work right?
Yes. It's hard to tell what's wrong when I cannot see your setup. Post some pics of your code - that'll help immensely.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
NVM it worked perfect ! I just changed the self attribute to a game attribute Thanks for your help bro! @Braydon_SFX
btw I gave you some free awesomes on your comments cause Im nice like that lol
You da man.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx