How do I make an area trigger that when yo enter you teleport somewhere else.
Also can I make a spawnweapontrigger spawn weapons that are dynamic, it only spawns static weapons and I'm trying to have a knife fall from a vent.
Any help would be great.
This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
How to make player teleporter and weapon spawner
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
-
RamboCreativity
- Meatbag
- Posts: 1
- Joined: Tue Aug 08, 2017 3:14 am
How to make player teleporter and weapon spawner
Last edited by JakSparro98 on Sun Mar 10, 2019 10:24 am, edited 1 time in total.
Reason: Changed the thread title with a more proper one.
Reason: Changed the thread title with a more proper one.
0 x
-
Hoang Marcel
- Superfighter

- Posts: 62
- Joined: Sun Mar 20, 2016 3:40 am
- Title: Custom map lover
- Started SFD: PreAlpha 1.6.4
- Location: Vietnam
- Gender:
Paste this script into your map :
public void Teleport(TriggerArgs arg){
IPlayer ply = (IPlayer)arg.Sender;
IObject obj = Game.GetSingleObjectByCustomID("obj");
Vector2 pos = obj.GetWorldPosition();
ply.SetWorldPosition(pos);
}
And then create an AreaTriggger with script method Teleport and create a non solid static title like an InvisibleBlockNoCollision with ObjectID obj
Instead of using the WeaponSpawnTrigger, use the SpawnObjectTrigger.
public void Teleport(TriggerArgs arg){
IPlayer ply = (IPlayer)arg.Sender;
IObject obj = Game.GetSingleObjectByCustomID("obj");
Vector2 pos = obj.GetWorldPosition();
ply.SetWorldPosition(pos);
}
And then create an AreaTriggger with script method Teleport and create a non solid static title like an InvisibleBlockNoCollision with ObjectID obj
Instead of using the WeaponSpawnTrigger, use the SpawnObjectTrigger.
1 x