Triggers courtesty of the Sheep, Steve Tack, and possibly me

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Triggers courtesty of the Sheep, Steve Tack, and possibly me

Post by DDL »

Ok, Neveos asked me if I still had some special triggers from the ol' DXE days, that were largely written by the sheep (and steve tack). I do, and so rather than just sending them to him, I figured I'd upload them here for everyone, in the process adding an egregious 12 kilobytes to the already burgeoning OTP storage servers. I know, I'm a monster.

They are as follows:

MoreTriggers: parent class (has its own icon, so you'll want to import than too), this simply integrates touch() (when you touch a trigger) and trigger() (when it gets triggered otherwise) to both call beentriggered, which makes downstream shit a whole fuckton easier.

ActorAppearTrigger: makes an actor become unhidden (bHidden=false) or hidden or switch between the two. Works for decorations etc, saves missionscripting. Say you wanted some cars to pull up outside a house after the player has entered: stick the cars there, make em bHidden=true, then unhide em with this.

ActorDestroyTrigger: destroys specified stuff within its radius. Works on inventory too, so you could stick it in a doorway and have it rob the player of all his weapons when he walks through.

AnimTrigger: forces an actor to play the specified anim. Animations in Unreal can be a bit wonky, so your milage may vary.

CreditsTrigger: gives the player credits (duh)

DamageTriggerDirect: think this might be one of mine...rather than damaging NPCs or whoever using damagetriggers, which are radius based and at best unreliable, this trigger simply finds the specified actors and damages them directly, using the damagetype of your choice.

EnergyTrigger: Gives the player energy

ExplosionTrigger: unsurprisingly, spawns an explosion.

FragmentTrigger: spawns fragments. As you do. I think I made this one, for excessive gore (fleshchunks are fragments).

HealthTrigger: Adds or sets absolutely, the players health. You can specifiy limbs, too, so you can have a trigger that very specifically rips JC's arm off. Or heals it.

PawnAppearTrigger: the one posted earlier: allows pawns to enterworld() and leaveworld() without requiring a missionscript.

PawnSpawnTrigger: normal spawntriggers are broken, and don't really work for pawns. This one does, more or less. Will not allow you to specify inventory, but alliances can be set. Thus you could use it to randomly add pedestrians in the background, or to make an eternal wave of MJ12Troops (since they already have inventory specified)

RandomTrigger: specify up to 16 things you want to happen: upon triggering, it'll fire off one of them, chosen at random.

SetGoalTrigger: Steve Tack's trigger: allows you to set a goal for a player without using conedit.

SheepsGiveItemTrigger: Gives the pawn triggering it (must be triggered/touched by a pawn, then) the item specified.

SkinColourTrigger: OMG RACISM! No, this is one of mine that I added because I like the idea of the game being able to detect whether you selected default, black, albino, latin or ginger JC: you specify the tags of various triggers based on detected playerskin, and it'll fire them accordingly when triggered. I.e. you could put "warningtrigger" in the JCAlbinoTag field, and have that fire off a specialevent telling the player to put some fucking suncream on.

SpawnTrigger: Spawns shit. You can specify an owner and a tag for the spawned item, too.

TriggerTrigger: Allows chaining triggers to other trigger-type events: when triggered it passes on the trigger in the form specified, either trigger, touch or frob. So you could have a player touch() this trigger and have this trigger then frob() an NPC behind a door, initiating a conversation that wouldn't otherwise be possible. Or something. I'm sure you could come up with much better ideas.


So there you go!

Enjoy! And remember, the credit mostly goes to the Sheep and Steve Tack. :)
Attachments
Sheeps triggers.zip
(11.12 KiB) Downloaded 600 times
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Neveos »

omg i love the unhidden trigger and the trigger trigger cause i needed exactly those and I was wondering how I was going to do it. You are badass DDL. Can't wait to have this first mission done so I can share it.

-edit- oops the racist trigger (lol jk) has a mess up because it calls upon a superclass called "sheepsmoretriggers" so all you'll need to do, if you dl it, is change that to "MoreTriggers". thanks for the awesomeness.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
nerdenstein
Illuminati
Posts: 1591
Joined: Thu Apr 24, 2008 7:40 pm
Location: Leicester, England, UK.

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by nerdenstein »

Neveos wrote:omg i love the unhidden trigger and the trigger trigger cause i needed exactly those and I was wondering how I was going to do it. You are badass DDL. Can't wait to have this first mission done so I can share it.
Looking forward to it Neveos. I'll give it a go if you need a play tester. :mrgreen:


@DDL, Thank for these Triggers. If I had the foggiest idea of what you were going on about, I'd definately give them a go. :P
The real trouble with reality is that there's no background music.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Jonas »

Seems like you should probably do most of this in the mission script, or in conversations, if we're being honest. But the appear/disappear triggers are pretty awesome :)
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Darma
UNATCO
Posts: 151
Joined: Wed Apr 15, 2009 2:20 pm

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Darma »

I would download it if I was not hating you
...
eh wait I don't
...
*downloads!!!!*
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Neveos »

On the AnimTrigger:

I am trying to imitate how the coder dude in TNM's corporate district uses the reload animation to make the napkin-map with this trigger. Problem is, it plays the animation, but it doesn't persist the way it does in TNM, so I am wondering if this is possible, and if I can use it to constantly repeat animations like HitTorsoBack so it appears as though the NPC is headbanging or something. So, Tween time appears to control how long the animation takes with the "Begin" and "End" animations, but what does "Rate" do?
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by DDL »

The animtrigger doesn't really work all that well, in my experience. I suspect what TNM did was recode consys to actually include some of the functionality it originally had (like play animation). The relevant code that needed changing was posted on PDX at some point in the past but may no longer be there. I'll try and get around to digging it up from my own stuff at some point (though I've added a lot of other crap to mine too, as no doubt Jonas and co. did to the consys that comes with TNM).. :).
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Jonas »

You can just use our Consys.u if you want. I don't remember if the source code was in the SDK, but otherwise just feel free to use the compiled .u as is.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Neveos »

Very cool. So "rate" and maybe even "addenergy" may rely on the updated consys.u. I remember that replacing the consys.u didn't affect the original game, but I'm pretty sure it is incompatible with the Ued2 hack. I may end up doing something like that in the end, though. Thank you.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by DDL »

The Ued2 hack really doesn't use any code from DX at all, though: that's kinda why it can work.

In the editor, all you need are variables and defaults. You don't actually need to be able to do anything WITH those vars and defprops, because no actual game code is ever executed in the editor. As far as the editor is concerned, this class:

Code: Select all

class YoMamma extends trigger;

var float SoFat;
var class<decoration> AsThis;

function trigger(actor other, pawn instigator)
{
  InsultPlayer(getplayerpawn());
}
function touch(pawn toucher)
{
  InsultPlayer(getplayerpawn());
}

defaultproperties
{
SoFat=40000
AsThis=deusex.chouchleather
} 
is exactly the same as this one:

Code: Select all

class YoMamma extends trigger;

var float SoFat;
var class<decoration> AsThis;

defaultproperties
{
SoFat=40000
AsThis=deusex.chouchleather
} 
It doesn't need to know how to insult the player, that all happens in game: it never happens in the editor. It just needs to know how fat the player's mother is, and what deco she most resembles. That's all vars and defprops.

So, for consys and ued2, just use the the one the comes with the ued2 hack, there is never ever any need to change it. And it's not even like you ever use anything in consys in the editor, that's done via an entirely separate program.

And if you use the TNM consys, you can use the "play animation" event from the add event menu in conedit, without even needing to use animtriggers.

:)
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Neveos »

Oh, it turns out you are right. I'm now wondering if I can get TNM maps to load in Ued2. The addenergy for the coffee still did not work though, if you know what might be wrong there, and I was wondering if you remember anything worthwhile in the new consys.u that I might take advantage of, like that play animation thing?
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Jonas »

The ability to transfer items that aren't in the default packages. You can specify which package to find the items in as a prefix to the object name, eg. TNMItems.AugCannisterCRT or TNMDataVault.TNMDV_QuadSchematics.

And then there's the compound flag checks we added. For example we can check the flag Killed_20_GoatCity_and_20_GoatTemplae_25, which will cause the game to check whether less than 25% of the NPCs in those two maps have been killed. At least I think it's "less than". To be honest the system is a little convoluted and I used it wrong several times in version 1, causing game logic mistakes that had to be fixed in patches. But once you know how to use it, it's really flexible!

(This also gives us undoubtedly the longest flag name in TNM: Killed_23_ABIExterior_and_23_ABIInterior_and_23_ABIRuins_30)
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Neveos »

lol. yeah that sounds really useful. with regard to the item transfer, will it actually show the thumbnail on the screen like it would for DX items upon transfer?
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Jonas »

Yeah I believe so. We use it all the time in TNM, so unless you noticed anything strange there...
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Neveos
X-51
Posts: 875
Joined: Wed Mar 03, 2010 1:29 am

Re: Triggers courtesty of the Sheep, Steve Tack, and possibl

Post by Neveos »

DDL wrote:AnimTrigger: forces an actor to play the specified anim.
http://www.youtube.com/watch?v=zZh_GCH5lHY

Check that out. I used the animation Run, and used 2 dispatchers to loop the animation for a treadmill.
What I do in my other free time:
http://www.youtube.com/watch?v=e3FfPUKuGsQ
Post Reply