How do I spawn a Cargo plane with a set drop location?
I've taken a look at Airdrop Control, and what he used to spawn a cargoplane to a position.
Thats was what he used (in c# tough)
Code:BaseEntity entity = GameManager.server.CreateEntity("events/cargo_plane", new Vector3(), new Quaternion()); if (entity != null) { var targetPos = new Vector3(); targetPos.x = Convert.ToSingle(arg.Args[0]); targetPos.y = Convert.ToSingle(arg.Args[1]); targetPos.z = Convert.ToSingle(arg.Args[2]); dropPoint.Add(entity as CargoPlane, targetPos); entity.Spawn(true); dropPoint.Remove(entity as CargoPlane);
Thats what I've come up with. Propably totally wrong...
Code:global.GameManager.server.CreateEntity("events/cargo_plane", UnityEngine.Vector3.get_up(), UnityEngine.Quaternion()) dropPoint:Add(CargoPlane, dropPos) entity:Spawn(true) dropPoint:Remove(CargoPlane)
And i am getting an error here:
------ EDIT -------Code:110 attempt to call field 'Quaternion' (a table value):
I found out for example that he set those dropPoint is set by him elsewhere ^^ but that does not change anything at that error
Code:dropPoint = new Dictionary<CargoPlane, Vector3>();
Spawning a Cargo plane with set drop location (LUA)
Discussion in 'Rust Development' started by LaserHydra, May 1, 2015.