67435814b9326

67435814baab7
1 Guest is here.
 

Topic: Need help with Traps and triggers Read 2190 times  

67435814bafd3StaticZ

67435814bb03c
HI, I whant to change "render type" property of some object (lets call it Obj1) after other is destroyed (lets call it Obj2). I see it can be done by "Receptrons" for Obj2  with "set property" and "destroy object" event. But in this case Obj2 will be destroyed after 1 hit, but i whant to make it much more healthy.
So instead I mad "Receptrons" with "Damage Object" events (and set HP and MaxHp properties). To be able to get destroy event I tryed use "Destroy trigger" object with link "~Switch link" to Obj2, and  "Switch link" to some other trap, but it seems it don't work such way. As i undestand all logic is made by traps and trigers but i don't see any set property trap. Any ideas?
67435814bb18e
I don't know if this will help but have you checked medsci1 where you break the glass before crawling through the vent during decompression? In a mod that I installed (secmod?....) it will fill the room with a fog or emit a fog after breaking the glass. I glanced at it once and it has to do with damage types (I think you had to list all) and it triggered...something.

I'm probably not helping much :( but something to look into?
67435814bb2a4
The triggerdestroy script has to be placed on the object being destroyed, you then switchlink from that. The destroy trigger object itself is basically useless and misleading as well. So in your example above you'd need to put triggerdestroy on obj2 and switchlink from that to whatever causes the desired effect.

67435814bb715StaticZ

67435814bb768
I don't know if this will help but have you checked medsci1 where you break the glass before crawling through the vent during decompression? In a mod that I installed (secmod?....) it will fill the room with a fog or emit a fog after breaking the glass. I glanced at it once and it has to do with damage types (I think you had to list all) and it triggered...something.
All i see there are corpse links and reseptrons. It's not just what I need - they spawn object not change there properties. (



The triggerdestroy script has to be placed on the object being destroyed, you then switchlink from that. The destroy trigger object itself is basically useless and misleading as well. So in your example above you'd need to put triggerdestroy on obj2 and switchlink from that to whatever causes the desired effect.
Thanks, its work! But how to change property of object?

67435814bb895StaticZ

67435814bb8e3
As i understant to change some property I have to use special TrapScripts script or Trap objects that are related with this scripts. Am I right?

Where I can get script list of default SS2 scripts (allobjects.osm) ? I  could find only script list for th2 - http://dromed.whoopdedo.org/dromed/script/index


One more quastion is way to make computers single using, i.e. I whana to hide hack button after it was hacked, what propertiy can do it?
67435814bba8a
Depends on what you want to change exactly. There are two general ways to change properties on the fly, excluding specialist scripts.

You can add a metaproperty to an object via a metaproperty list trap and that will usually do the trick, you'd need to create the metaprop in the object hierarchy with the desired property/ properties on it then use the metaproperty type and obj list arg script properties on the trap to set up the target. This is how, for example, monsters can be damaged as they have vulnerability MPs, removing them via a metaprop trap would make the monsters invulnerable while adding one would make them vulnerable again.

Otherwise you can do S&R based stuff using 'set property', but if you do that you probably don't need triggerdestroy at all in the previous example, as you can set the source bearing object to be generated on the object's death using a custom object and a corpse link. You can get a list of what the properties are called using the 'list_props' command. I suspect this would be the only one to work for changing scripts on the fly (eg removing the 'hackability' of computers)- and there may be complications when working with scripts.

Depending on what you want to do it may also be more efficient to use NV's custom scripts.

67435814bbb59StaticZ

67435814bbba2
Thanks you match now I understand what metaprops are and for what they are using. In property ObjListArg you need to write target object ID, how to erite several? separate them with space, comma or break line?

What means  S&R ?

 corpse link don't work for me as I need to make computer with Physical Attach link to movable object. Any way I did it with metaprops, but how to remove 'hackability' I really don't understand.
67435814bbcef
Several objects can be defined in the objlist arg by separating with commas, eg '581, 582' would effect both object 581 and 582

S&R is Source (aka stim/ stimulus) and Receptron.

'Hackability' is controlled by a script, so the object will have a script on it ('computer' for a computer, I think) which tells the engine to give the interface a specific interface and hack tab. If you want to just turn it off outright you'd just need to either remove that script dynamically, or more safely one of the properties that fires it (eg set Engine Features: Frobinfo to all none; there may even be a FrobInert metaproperty for that already though I'm not sure if that's only Thief 2, in any case it's easy to set up). If you want to change to a different script it is more complicated.

67435814bbdf1StaticZ

67435814bbe3b
Thanks again, thow it's not just i whanted. I whanted simply to disable "Hack" button while removing script player just couldn't open computer window again. But now i understand that it can be changed only by script...

One more question:
1) how to change rotation center of Tweq->Rotation property? I try to make fan and need to make rotation around some other point, not object centere.
2) There are rotation parametrs in Physics->Model->Controls wich sims dont take any effect and some more in Physics->Model->State which are resert after loading level. As i understand last are as current state that other scripts and properties modify in game at runtime, but how to use Physics->Model->Controls and what differens with Tweq->Rotation ?
67435814bbf63
The usual way a fan  would be done by the devs would be to make a model with the rotating fan bit as a submodel- see object -2589 Air Ventilator for an example- rather than use a tweq rotate which is really designed to rotate the whole object. That's a similar process to how the moveable pumps and similar work as well.

I don't really know if there's an alternative way that would work using tweq rotate, as I've never had to use them. It might be possible to use anim8or or similar to adjust the model's centre and do it that way, but I'm not sure about it.

67435814bc0ddStaticZ

67435814bc129
tweq rotate works fine, the problem is that it rotate object only around it's center, where I whant to learn how make rotation around single side (edge).

Any way, I see this fan, it also use TWEQ Joint properties, I can't get any description of them and don't understand what exatly they do. Any way just now I found way and used upscale other fan - vent fan (-2559) with TWEQ Ratate property, looks rather nice:
Image: http://s1.ipicture.ru/uploads/20130717/NUZ1e2h5.png
, but it can be used only as single side fan...

By the way in mission parametrs are fog settings, I set collor and add room (bigger than fog distance) with Weather->Local Weather where set my Fog setting. Then I type "fog_on" to enable fog and made "compute pathfinding database" (I don't know why, i read about this on some other dead site) and make "portalize". No any visible effects, what I did wrong? How use fog?
« Last Edit: 17. July 2013, 11:07:34 by StaticZ »
67435814bc288
You have to turn fog on in cam.cfg as well by adding 'fogging 1' to it. It may also need 'render_weather 1', not sure.

Objects using tweq joints are specially built ones with submodels- basically models attached to another that move independently of the main object. Things like that air ventilator, the mechanical pumps and such use it. They require a properly set up model to function though, but if LGS/IG wanted a vent fan to rotate that is how they would do it rather than use tweq rotate.

You can change the rotation axis of a tweq:rotate object via using the rotation axis x,y,z (so z rotates around the z axis) and that vent fan works OK as a workaround. I don't think you can specify it to rotate on an offset though, so it will always rotate around its cental z (as example) axis, not an offset z axis.
1 Guest is here.
" You're not the Messiah, you're a very naughty boy "
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67435814bccbe