Mig Posted April 16, 2015 Report Share Posted April 16, 2015 Hello everyone I need help :) I try to spawn a box when a vehicle moves on a trigger. who can help me? thank you Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted April 16, 2015 Report Share Posted April 16, 2015 why use a trigger to spawn the box? i mean dont get me wrong, it wont be hard, but why not just spawn the box via a script on server startup? else you will just have to build in precations for it not to spawn more than once or it will spawn a new box ever time a player comes near ... Link to comment Share on other sites More sharing options...
0 Mig Posted April 16, 2015 Author Report Share Posted April 16, 2015 for a mission. the players must bring a vehicle on a specific point. the vehicle on the point , the box spawn Link to comment Share on other sites More sharing options...
0 SchwEde Posted April 16, 2015 Report Share Posted April 16, 2015 well in that case just create something trough 3d editor and use it. or write a simple if command with position and nearObjects (or something) to check for this vehicle and then let spawn the box with the content Link to comment Share on other sites More sharing options...
0 Mig Posted April 16, 2015 Author Report Share Posted April 16, 2015 possible to have an example? Link to comment Share on other sites More sharing options...
0 SchwEde Posted April 16, 2015 Report Share Posted April 16, 2015 _position = somePositionArray; _nearUral = nearestObjects [_position, ["Truck"], 50]; //or use Ural Classname if you want at specific one if (_nearUral > 0) then { \* spawn box script*\ }; to give you an idea Link to comment Share on other sites More sharing options...
0 Mig Posted April 16, 2015 Author Report Share Posted April 16, 2015 thank you for the example. it also works with AI? Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted April 16, 2015 Report Share Posted April 16, 2015 what exactly are you trying to make here, a mission? all this will depend on how you expect to execute this, do you intend that the players are supposed to spawn the box or do you want the server to do everything ... all that affect how the code should be written, so you have to decide how it is supposed to work, before you can get a propper example. _position = somePositionArray; _nearUral = nearestObjects [_position, ["Truck"], 50]; //or use Ural Classname if you want at specific one if (_nearUral > 0) then { \* spawn box script*\ }; to give you an idea this dosnt really make much sence, how do you intend to execute this and what if it activates before someone gets there in a ural, then it wont happend again ... if you would just execute this, nothing would happend unless a truck is near that position on server restart, if you execute this in a trigger it will trigger for each player entering that trigger. Link to comment Share on other sites More sharing options...
0 SchwEde Posted April 16, 2015 Report Share Posted April 16, 2015 this was just a small example, nothing he can actually use ;P to get everything done right it will take a while and some trial and error. problem with spawning it from the client would be antihack and maybe if done wrong only visible by the player who executed this script. best thing is to use WAI for this and create a new mission. Probably there is already something with the same idea out there :) Link to comment Share on other sites More sharing options...
0 Mig Posted April 17, 2015 Author Report Share Posted April 17, 2015 yes to create a mission. the players must take ural, drive the ural to a point, get on that spawn a box with the loot Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted April 17, 2015 Report Share Posted April 17, 2015 yes to create a mission. the players must take ural, drive the ural to a point, get on that spawn a box with the loot i think the easiest way to do what you want, would be to be to use a mission system and modify a mission to waituntil both a player and a ural is near the area of completion and then create the loot box, you could easily make something like this with like DZMS or whatever, if you know what you are doing. SchwEde 1 Link to comment Share on other sites More sharing options...
Question
Mig
Hello everyone
I need help :)
I try to spawn a box when a vehicle moves on a trigger.
who can help me?
thank you
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now