Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: KobyPierce123 on June 06, 2020, 07:23:38 PM

Title: How do you make a charterer teleport when you get in a radius of an object?
Post by: KobyPierce123 on June 06, 2020, 07:23:38 PM
How do you make a charterer teleport when you get in a radius of an object? And how do you make it where when you touch an object it plays a sound?
Title: Re: How do you make a charterer teleport when you get in a radius of an object?
Post by: KobyPierce123 on June 06, 2020, 07:26:43 PM
And how do you rename a project in unity?
Title: Re: How do you make a charterer teleport when you get in a radius of an object?
Post by: Thore on June 06, 2020, 08:07:56 PM
 
And how do you rename a project in unity?


You can rename the main folder of the project (the one shown in hub), but you may then just ADD it again in the hub.
Title: Re: How do you make a charterer teleport when you get in a radius of an object?
Post by: heavygunner on June 06, 2020, 08:32:05 PM
How do you make a charterer teleport when you get in a radius of an object? And how do you make it where when you touch an object it plays a sound?
Get Distance between Player and that object every frame. Then, use Float compare and fire the action when that Distance is met radius.
Title: Re: How do you make a charterer teleport when you get in a radius of an object?
Post by: LuminRabbit on June 06, 2020, 08:39:39 PM
You could also add colliders.

Use a sphere collider for the radius, check IsTrigger in the inspector (may need to put this on an empty gameobject and make it a child), then do a Trigger Event action to another state which sets the characters position (sSet Position action) and presto the character is teleported.

You can use a trigger for the sound as well same concept just a smaller collider that fits perfectly.