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 do I make my object/s respawn with its eleavtor joints?

Share questions and tutorials related to the map editor. Share you maps in the Superfighters Deluxe Custom Maps section.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
TheBlackshot
Superfighter
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?

Post by TheBlackshot » Sun Oct 02, 2016 12:04 pm

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).
Image
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.
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

User avatar
Motto73
Superfighter
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

Post by Motto73 » Mon Oct 03, 2016 7:06 am

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 x
Image

User avatar
TheBlackshot
Superfighter
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:

Post by TheBlackshot » Mon Oct 03, 2016 5:00 pm

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.
0 x
Blame the game, not the player

User avatar
Motto73
Superfighter
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

Post by Motto73 » Tue Oct 04, 2016 9:17 am

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
Image

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Mon Oct 10, 2016 6:48 pm

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

User avatar
Motto73
Superfighter
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

Post by Motto73 » Wed Oct 12, 2016 10:04 am

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
Image

Post Reply