Bunow Posted November 27, 2014 Share Posted November 27, 2014 Hi!I'm trying to make a mod where an object spawns randomly in the map, in a defined day/time in the game ( like the Goose egg) But I'm realy a shame at coding so i ask you help! Link to comment https://forums.kleientertainment.com/forums/topic/44920-spawn-an-object-randomly-in-the-map/ Share on other sites More sharing options...
Mobbstar Posted November 27, 2014 Share Posted November 27, 2014 You can spawn the object and then have to set its position using Transform:SetPosition(x,y,z). y should be 0, x and z should be random, but the spot should meet a certain criteria: you can check whether that spot turned out to be actual land using inst:IsOnValidGround(). Link to comment https://forums.kleientertainment.com/forums/topic/44920-spawn-an-object-randomly-in-the-map/#findComment-575050 Share on other sites More sharing options...
Bunow Posted November 28, 2014 Author Share Posted November 28, 2014 (edited) Ok! But what abbout the time where the object spawns?? Edited November 30, 2014 by Bunow Link to comment https://forums.kleientertainment.com/forums/topic/44920-spawn-an-object-randomly-in-the-map/#findComment-575439 Share on other sites More sharing options...
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