Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

How to make player teleporter and weapon spawner

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
RamboCreativity
Meatbag
Posts: 1
Joined: Tue Aug 08, 2017 3:14 am

How to make player teleporter and weapon spawner

Post by RamboCreativity » Tue Aug 08, 2017 3:20 am

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.
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.
0 x

Hoang Marcel
Superfighter
Superfighter
Posts: 62
Joined: Sun Mar 20, 2016 3:40 am
Title: Custom map lover
Started SFD: PreAlpha 1.6.4
Location: Vietnam
Gender:

Post by Hoang Marcel » Tue Aug 08, 2017 4:20 am

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.
1 x

Post Reply