I want my wagon to disappear at the area on the right side, and after a short time respawn with all its elevator path joints and destroy trigger settings (same id).
Now I already copied the SpawnRandomObject script part from the official Pistons map, but it only spawns one object. I guess, I can change the code to spawn all ids I want, but how?
You get the picture of the permanent wagons going into the cave? That's what I'm trying to construct.
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.
New to the forum? Say hello in this topic! Also make sure to read the rules.
How do I make my object/s respawn with its eleavtor joints?
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- TheBlackshot
- Superfighter
- Posts: 67
- Joined: Thu May 19, 2016 11:35 am
- Title: Trigger-Black
- SFD Alias: Blackshot
- Started SFD: Winter 12/13
- Gender:
- Age: 23
- Contact:
How do I make my object/s respawn with its eleavtor joints?
Last edited by TheBlackshot on Mon Oct 03, 2016 4:33 pm, edited 1 time in total.
0 x
Blame the game, not the player
- Motto73
- Superfighter
- Posts: 316
- Joined: Mon May 09, 2016 7:35 am
- Title: Lazy ass
- SFD Account: Motto73
- Started SFD: Multiplayer Test Demo
- Location: Sunny City
- Gender:
- Age: 24
So you can make them appear by:
1. Select all the rail objects and the main object
2. Press Ctrl+G to group them.
3. Make a trigger that triggers the groupmarker
4. BOOM Thats it
You can open the random script in the script window. Then you can see how all the Id's are written there, eg. "Crate00". You can write more like this:
"MyIds1",
"Myids2",
and so on...
Remember not to put the comma after the very last id. Then press F5 and compile it.
1. Select all the rail objects and the main object
2. Press Ctrl+G to group them.
3. Make a trigger that triggers the groupmarker
4. BOOM Thats it
You can open the random script in the script window. Then you can see how all the Id's are written there, eg. "Crate00". You can write more like this:
"MyIds1",
"Myids2",
and so on...
Remember not to put the comma after the very last id. Then press F5 and compile it.
1 x
- TheBlackshot
- Superfighter
- Posts: 67
- Joined: Thu May 19, 2016 11:35 am
- Title: Trigger-Black
- SFD Alias: Blackshot
- Started SFD: Winter 12/13
- Gender:
- Age: 23
- Contact:
Good idea! Still, I have a problem now.
I made a group out of all objects I want, made sure that groupmarker has an id and then edited the script. The objects were removed and all I left there was "GroupMarker(its id)". It should be correct, I compared it with my older map Outtown for which I editet this very script as well. I also checked if the limit wasn't anything like 1 and of course I didn't forget to compile the script. What I used is a TimerTrigger that triggers my ScriptTrigger (like in Outtown) with the SpawnRandomObject method. I placed the ScriptTrigger exactly where the GroupMarker is.
When I start the game and wait for the timer I set, the (yet invisible) ScriptTrigger turns into a pink block (meaning the script method didn't work probably).
I'm guessing it could be because the whole group already exists under the same id, since the only thing being destroyed is the wagon. Or the script needs more than one object id, so it can choose one of multiple ids as it's "random". Or maybe I didn't write the object id correctly.
I made a group out of all objects I want, made sure that groupmarker has an id and then edited the script. The objects were removed and all I left there was "GroupMarker(its id)". It should be correct, I compared it with my older map Outtown for which I editet this very script as well. I also checked if the limit wasn't anything like 1 and of course I didn't forget to compile the script. What I used is a TimerTrigger that triggers my ScriptTrigger (like in Outtown) with the SpawnRandomObject method. I placed the ScriptTrigger exactly where the GroupMarker is.
When I start the game and wait for the timer I set, the (yet invisible) ScriptTrigger turns into a pink block (meaning the script method didn't work probably).
I'm guessing it could be because the whole group already exists under the same id, since the only thing being destroyed is the wagon. Or the script needs more than one object id, so it can choose one of multiple ids as it's "random". Or maybe I didn't write the object id correctly.
0 x
Blame the game, not the player
- Motto73
- Superfighter
- Posts: 316
- Joined: Mon May 09, 2016 7:35 am
- Title: Lazy ass
- SFD Account: Motto73
- Started SFD: Multiplayer Test Demo
- Location: Sunny City
- Gender:
- Age: 24
If it creates a magenta block, it means that the Id is not written correctly. Check them twice when you have written them.
0 x
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
If you only need one object active at any given time then maybe look at how we did the subway train. We simply just move it back to the start once it reaches the end of its track.
0 x
Gurt
- Motto73
- Superfighter
- Posts: 316
- Joined: Mon May 09, 2016 7:35 am
- Title: Lazy ass
- SFD Account: Motto73
- Started SFD: Multiplayer Test Demo
- Location: Sunny City
- Gender:
- Age: 24
Another good idea is like, if you need a constantly moving elevator that appears from some corner or side, you can check how the fairground map is made.
0 x