Post: Nuke spawnables
04-21-2017, 11:58 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So I am using Extinct's spawnable rides and I have seen on other menus (Project TCM v12) there is an option to nuke it and it basically makes the spawnable fall apart and then delete after like 20 seconds, does anyone have the code or can tell me how to do it?
04-21-2017, 01:58 PM #2
Patrick
League Champion
Originally posted by quacked420 View Post
Snip.


Okay to the 'Nuke' for my rides you simply do this for the array of the entities:
I will show you with my ferris wheel code.

Here is the code:
    
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);


Here are the functions that the code above uses.
    Array_Physics(ID)
{
foreach(model in ID)
model thread DelayedFall(5);//Apply_Physics
}

DelayedFall( Num )
{
if(isDefined(self))
self physicsLaunch();
wait Num;
if(isDefined(self))
self delete();
}

The following user thanked Patrick for this useful post:

quacked420
04-21-2017, 02:04 PM #3
Originally posted by Patrick View Post
Okay to the 'Nuke' for my rides you simply do this for the array of the entities:
I will show you with my ferris wheel code.

Here is the code:
    
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);


Here are the functions that the code above uses.
    Array_Physics(ID)
{
foreach(model in ID)
model thread DelayedFall(5);//Apply_Physics
}

DelayedFall( Num )
{
if(isDefined(self))
self physicsLaunch();
wait Num;
if(isDefined(self))
self delete();
}


Wow, didn't know you were Extinct lmao, thanks for the codes man!
04-21-2017, 02:08 PM #4
Originally posted by Patrick View Post
Okay to the 'Nuke' for my rides you simply do this for the array of the entities:
I will show you with my ferris wheel code.

Here is the code:
    
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);


Here are the functions that the code above uses.
    Array_Physics(ID)
{
foreach(model in ID)
model thread DelayedFall(5);//Apply_Physics
}

DelayedFall( Num )
{
if(isDefined(self))
self physicsLaunch();
wait Num;
if(isDefined(self))
self delete();
}


Also does:

    
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);


Go into Init()?
04-21-2017, 02:54 PM #5
MrXcell1
Pokemon Trainer
Yes, they do :p

Update: no.. im lying.. dont listen to me lol
Last edited by MrXcell1 ; 04-21-2017 at 03:00 PM. Reason: being a nub
04-21-2017, 02:59 PM #6
Patrick
League Champion
Originally posted by quacked420 View Post
Wow, didn't know you were Extinct lmao, thanks for the codes man!

Yeah i'm Extinct ahah!

Originally posted by quacked420 View Post
Go into Init()?

No they do not go in the init's, You place them in a function and call them via your menu, for instance
    nukeFerris()
{
if(isDefined(level.Ferris_Wheel))
{
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);
}
else self iprintln("Ferris Wheel Has Not Been Spawned.");
}
04-21-2017, 03:21 PM #7
Originally posted by Patrick View Post
Yeah i'm Extinct ahah!


No they do not go in the init's, You place them in a function and call them via your menu, for instance
    
nukeFerris()
{
if(isDefined(level.Ferris_Wheel))
{
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);
}
else self iprintln("Ferris Wheel Has Not Been Spawned.");
}


I called nukeFerris and it says "Ferris Wheel Has Not Been Spawned." but it has :( I'm not good with spawnables. This is what I've done:

    nukeFerris()
{
if(isDefined(level.Ferris_Wheel))
{
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);
}
else self iprintln("Ferris Wheel Has Not Been Spawned.");
}

Array_Physics(ID)
{
foreach(model in ID)
model thread DelayedFall(5);//Apply_Physics
}

DelayedFall( Num )
{
if(isDefined(self))
self physicsLaunch();
wait Num;
if(isDefined(self))
self delete();
}
Last edited by quacked420 ; 04-21-2017 at 03:25 PM.
04-21-2017, 03:30 PM #8
Patrick
League Champion
Originally posted by quacked420 View Post
I called nukeFerris and it says "Ferris Wheel Has Not Been Spawned." but it has :( I'm not good with spawnables. This is what I've done:

    nukeFerris()
{
if(isDefined(level.Ferris_Wheel))
{
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);
}
else self iprintln("Ferris Wheel Has Not Been Spawned.");
}

Array_Physics(ID)
{
foreach(model in ID)
model thread DelayedFall(5);//Apply_Physics
}

DelayedFall( Num )
{
if(isDefined(self))
self physicsLaunch();
wait Num;
if(isDefined(self))
self delete();
}


Its because level.Ferris_Wheel is undefined.
At the top of the spawn ferris wheel function do this
    level.Ferris_Wheel = true;

and in the 'nukeFerris' function do this inside of the if statement
    level.Ferris_Wheel = undefined;

The following user thanked Patrick for this useful post:

quacked420
04-21-2017, 03:39 PM #9
Originally posted by Patrick View Post
Its because level.Ferris_Wheel is undefined.
At the top of the spawn ferris wheel function do this
    level.Ferris_Wheel = true;

and in the 'nukeFerris' function do this inside of the if statement
    level.Ferris_Wheel = undefined;


Woow, it works! (But I froze like 10 seconds after it deleted :/)

    
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);
Last edited by quacked420 ; 04-21-2017 at 03:50 PM.
04-21-2017, 05:16 PM #10
Patrick
League Champion
Originally posted by quacked420 View Post
Woow, it works! (But I froze like 10 seconds after it deleted :/)

    
level.ferrisTrig delete();
level.FerrisAttach delete();
level.FerrisLink delete();

self thread Array_Physics(level.FerrisLegs);
self thread Array_Physics(level.FerrisSeats);
self thread Array_Physics(level.Ferris);


its because you need to end functions that are running ahah, in the nuke ferris function add this
    level notify("Destroy_Ferris");

The following user thanked Patrick for this useful post:

quacked420

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo