Trigger(s) set-up help

Got questions about Shipmaker? Get answers here. Please read the stickied topics first!

Moderators: th15, Moderators

Post Reply
ikabubu
Ensign
Ensign
Posts: 2
Joined: Fri Sep 25, 2009 7:12 am

Trigger(s) set-up help

Post by ikabubu »

Hey guys, let me be straightforward. I've only recently dabbled in moving sections, and I have an idea for a shape-shifting ship. However, I can't for the love-of-all-my-sanity figure out how to set up the triggers to make the ship behave the way I want it to.

Here's my idea:

1) Ship remains in normal/unchanged mode when no enemy present.

2) Upon detecting enemy (probably attached to a "weapon acquires target" trigger) the ship opens up.

3) The ship REMAINS open while attacking (animation off upon reaching 'movement target' and stays there).

4) The ship reverts back to normal mode (continues second half of the animation and all moving parts go back to 'origin'). This probably is triggered by 'weapon loses target' trigger.

I just can't figure it out, and I don't want to spend a ton of time with trial and error if you guys can just as easily help me reinvent the wheel.

Thanks
thanto_
Commander
Commander
Posts: 157
Joined: Sat Feb 02, 2008 4:47 pm

Post by thanto_ »

I'm working on this very thing right now, and it is a lot more complex than it seems.


Getting things to immediately activate and deactivate when enemies enter and leave range is very easy. It's when you activate a transformation/deployment process that takes time that things get sticky. The reason is that you can have enemies enter or leave range during the middle of deployment or undeployment. If you don't take that into consideration, you could potentially have a ship deploy, then the enemy ship leaves, triggering undeployment, then the enemy could immediately enter range during undeployment. If you don't have triggers setup to account for that, your ship is going to be stuck undeployed until the enemy leaves and re-enters range again, which probably won't happen before your ship is destroyed.


Getting something to undeploy after enemies have left if it's in the middle of deploying, or getting something to deploy when enemies enter while its in the middle of undeploying is a pain in the ass. I'm working on a way to do this right now, but some things aren't behaving exactly as I expect. I've made some progress using a system to preserve inputs, but what I need is a way to filter them so that not all changes in input necessarily result in a change in state. For example, if an enemy leaves range during deployment, then re-enters range, the ship should finish deploying and stay deployed. I haven't quite figured out how to do that yet, but I believe I'm close.
Ixranin
Captain
Captain
Posts: 420
Joined: Thu Sep 06, 2007 9:50 am

Post by Ixranin »

I remember working on this for a couple days to no avail. If there were two or more enemies, destroying one would cause the player ship's weapons to lose target and the ship to revert, then get caught with its triggers backwards. Since I stopped building BSF ships, I never got around to testing the newer system I thought of, but maybe I should try again.
[img]http://img.photobucket.com/albums/v521/IxraninEL/Screenies/AsiSig1.gif[/img]
thanto_
Commander
Commander
Posts: 157
Joined: Sat Feb 02, 2008 4:47 pm

Post by thanto_ »

Yeah, that's the exact problem I was talking about. I'm sure that there is a way to do it, and I'm sure it's just a matter of building proper input filters or logic gates. Basically, I need to figure out how to make an XOR gate. The idea I had for how to do that didn't pan out the way I expected.
ikabubu
Ensign
Ensign
Posts: 2
Joined: Fri Sep 25, 2009 7:12 am

Post by ikabubu »

It doesn't surprise me that the "remaining in mid-action" idea isn't original, but I am a bit surprised to see that there is no "freeze action when animation reaches point "x" until <trigger>".

The shipmaker and game is already an impressive array of tools, and I'm sure we can compile a humongous list of things we want to add. I'm just a little bummed that you see the concept elsewhere, but here we are struggling under our parameters.

Oh well... Thanks guys. I'd love to know if anybody does get it.
Chiiro
Commodore
Commodore
Posts: 521
Joined: Mon Mar 24, 2008 5:27 am
Location: San Diego, CA

Post by Chiiro »

A temporary sollution would be to use a keypress for the transformation.
Sure it won't work for the AI and it won't be automatic, but it won't de-sync either if you don't press the key like a madman.
Fly me to the moon, so I can play among the stars~
Let me see what spring is like on Jupiter and Mars~
Post Reply