665c2c29abab9

665c2c29ac418
1 Guest is here.
 

Topic: Tweq Question Read 1297 times  

665c2c29ac768Yankee Clipper

665c2c29ac7df
Isn't there a way to use one of the tweq properties to convert an object from one thing to another via DML? I have a grenade launcher that secretly wants to be a fusion cannon.

665c2c29acbcbvoodoo47

665c2c29acc22
I'm not aware of a specific (tweq, or other) prop that would destroy the orig item and spawn a different item in its place upon activation (actually slay object and fliderize whatever is needed from its corpse), so I would just take the orig item, remove physics, set it to not rendered, move it up a notch or two, convert it into an emitter trap (make sure to set it to NOT inherit scripts), and use it to spawn the desired item upon sim (or any other suitable event, but make sure it can fire only once).

similar setup is used in the ss2tool dml fixes to spawn a hazard suit for newbie use in botm;
Code: [Select]
//lets use one of those redundant ambients to spawn a vacc suit
ObjProp 1450 "Position"
{
"Location" 118, -108, 5.55
}
+ObjProp 1450 "Scripts"
{
"Script 0" TrapTweq
}
+ObjProp 1450 "CfgTweqEmit"
{
"Halt" Stop Tweq
"AnimC" Sim
"Rate" 1000
"Max frames" 1
"Emit what" Vacc Suit
}
+ObjProp 706 "Scripts"
{
"Script 0" TriggerDestroy
}
+Link 706 1450 "SwitchLink"
{
}
+ObjProp 1450 "DiffPermit"
{
"quest var values" 1, 2
}

it's spawned when the player destroys the first membrane (at that point, I didn't want to mess around with sim activation or similar).


//just resolved a similar problem in T1, here is the dml;
Code: [Select]
//the broken zombie cannot be fixed, so lets turn him into an emitter and spawn another zombie
-ObjProp 855 "PhysType"
ObjProp 855 "Position"
{
    "Location" 19.3684, -93.0408, 31.98
}
+ObjProp 855 "Scripts"
{
    "Script 0" TrapTweqEmit
    "Script 1" ""
    "Script 2" ""
    "Script 3" ""
    "Don't Inherit" true
}
+ObjProp 855 "CfgTweqEmit"
{
    "Halt" Destroy Obj
    "Rate" 1
    "Max frames" 1
    "Emit what" Zombie
}
+ObjProp 855 "StTweqEmit"
{
"AnimS" On
}

this basically moves the orig obj up (there needs to be enough space or the new object will not be spawned), spawns the new object, and destroys the emitting object - pretty much exactly what you want.
« Last Edit: 01. February 2018, 18:38:01 by voodoo47 »

665c2c29acce7Yankee Clipper

665c2c29acd31
Beautiful!

Just for giggles I tried it (zombie method) without the repositioning, and it still worked.

665c2c29acdb8voodoo47

665c2c29ace07
it will work as long as there is enough space.

665c2c29ace9dvoodoo47

665c2c29acee6
necromancy - seems like adding the TrapTweqEmit script is actually not required.
« Last Edit: 05. January 2017, 19:12:07 by voodoo47 »
1 Guest is here.
"Sayonara Baby!" (Terminator II, Spanish version)
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
665c2c29adde2