Code Request

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
User avatar
kodiak1504
Mole Person
Posts: 5
Joined: Thu Sep 02, 2010 10:17 am

Code Request

Post by kodiak1504 »

Hi everyone,

I'm trying to make a switch that will only trigger its event if a certain flag is true and will send the player a message if the flag is false. However my coding skills aren't that great and I have hit a wall trying to do it. If anyone could suggest a solution or write some code that would do this I would be very grateful.

Thanks,

kodiak
Praise Jebus!!
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Code Request

Post by G-Flex »

Can't this be done via a simple "else" statement added to FlagTrigger.uc?
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Code Request

Post by DDL »

Can be done with no scripting at all.

Two flagtriggers, both set to check flags, not set them. One looks for YOURFLAG=false, the other for YOURFLAG=true.

The true one triggers your actual event, the false one triggers a specialevent actor that sends the player a message. Or you could use a datalink trigger if you like.
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Code Request

Post by G-Flex »

That's a pretty good point. It's generally smart to see if a combination of triggers (or other actors) will work before scrambling to make a new one.
Post Reply