Need help on retractable weapon hatches
Moderators: th15, Moderators
-
- Commander
- Posts: 116
- Joined: Sat Mar 01, 2008 3:49 am
Need help on retractable weapon hatches
A retractable door made by a section using the following trigger configuration works but not for long:
Trigger on 1:
Weapon acquired target
Trigger on 2:
Weapon lost target
Trigger off 1:
Movement reaches target (s)
Trigger off 2:
Movement reaches origin (s)
It functions by opening up the door when target is acquired, door stops at open position due to off trigger; and vice versa for target lost. It would function well for several sequences.
However problem arises frequently which results in closing door when target acquired and vice versa when target come and go; and sometimes it stop working for some reasons.
What's the best trigger procedure for making a retractable weapon hatch that closes when target is lost, and open when target is acquired?
I can't use the adv. delay (delay after reaching target before returning to origin - P.S. I think adv. delay and ret. delay should have names swapped around) because it will make the hatch close and open even target is continuously tracked by the weapon.
Trigger on 1:
Weapon acquired target
Trigger on 2:
Weapon lost target
Trigger off 1:
Movement reaches target (s)
Trigger off 2:
Movement reaches origin (s)
It functions by opening up the door when target is acquired, door stops at open position due to off trigger; and vice versa for target lost. It would function well for several sequences.
However problem arises frequently which results in closing door when target acquired and vice versa when target come and go; and sometimes it stop working for some reasons.
What's the best trigger procedure for making a retractable weapon hatch that closes when target is lost, and open when target is acquired?
I can't use the adv. delay (delay after reaching target before returning to origin - P.S. I think adv. delay and ret. delay should have names swapped around) because it will make the hatch close and open even target is continuously tracked by the weapon.
Hmm, this might be problematic. I have two ideas.
Use two sections, with opposite move directions, and their targets far off in the distance. By default movement should be disabled. Trigger movement of one section (the one supposed to open the hatch) with wapon acq. target, trigger off after certain number of frames. Trigger movement of the other section (closing hatch) with weapon lost target, trigger off after a number of frames. You might need to use delays.
Other idea is to use some kind of chain of helper weapon and/or sections, that would server only for triggering, but this is a much more advanced concept.
You should also try messing with trigger delays. But to be honset, trigger actions 'weapon acquired target' and 'weapon lost target' are not meant to be used with weapons that quickly loose their targets and/or long movement sequences.
Use two sections, with opposite move directions, and their targets far off in the distance. By default movement should be disabled. Trigger movement of one section (the one supposed to open the hatch) with wapon acq. target, trigger off after certain number of frames. Trigger movement of the other section (closing hatch) with weapon lost target, trigger off after a number of frames. You might need to use delays.
Other idea is to use some kind of chain of helper weapon and/or sections, that would server only for triggering, but this is a much more advanced concept.
You should also try messing with trigger delays. But to be honset, trigger actions 'weapon acquired target' and 'weapon lost target' are not meant to be used with weapons that quickly loose their targets and/or long movement sequences.
-
- Commander
- Posts: 116
- Joined: Sat Mar 01, 2008 3:49 am
EDIT: sorry I was not thinking it through properly, I will see if I can work this through.Kaelis wrote: Use two sections, with opposite move directions, and their targets far off in the distance. By default movement should be disabled. Trigger movement of one section (the one supposed to open the hatch) with wapon acq. target, trigger off after certain number of frames. Trigger movement of the other section (closing hatch) with weapon lost target, trigger off after a number of frames. You might need to use delays.
Any triggering events are ignored when delay is in effect. The delay aren't extended when a new event occurs. For example, I cannot have target acquired event to keep a hatch that automatically close after a certain delay open. It won't update the delay counter when it keeps acquiring the target. So I don't know how delay can help.Kaelis wrote: You should also try messing with trigger delays. But to be honset, trigger actions 'weapon acquired target' and 'weapon lost target' are not meant to be used with weapons that quickly loose their targets and/or long movement sequences.
I used a targeting dummy weapon which is a mining laser with a modified turn rate of 20 (which is really high), and an arc comparable to my other real weapons. If there's a better weapon for that purpose please tell me.
Last edited by AnnihilatorX on Fri Feb 13, 2009 7:44 am, edited 1 time in total.
-
- Commander
- Posts: 116
- Joined: Sat Mar 01, 2008 3:49 am
I think it may be wise to include a "move mode 2" action in SM with behavior so that a section has on and off movement sequence specified by the same fields as normal move action. Each open and close sequences both stop themselves by default when reaching target or origin. Rather than making movement stop, the trigger off fields initiate the closing sequence regardless of the state of the animation until it reaches origin or interrupted by another trigger on event and vice versa.
What do you mean, your other real weapons? Arc should be 360, really.AnnihilatorX wrote:I used a targeting dummy weapon which is a mining laser with a modified turn rate of 20 (which is really high), and an arc comparable to my other real weapons.
If it still looses targets despite that, then it looks like its a bug.
-
- Commander
- Posts: 116
- Joined: Sat Mar 01, 2008 3:49 am
The hatch is positioned facing broadside so I do not want 360 arc really. The current arc settings is 75 which is a bit higher than the other real weapons inside the hatch.Kaelis wrote:What do you mean, your other real weapons? Arc should be 360, really.AnnihilatorX wrote:I used a targeting dummy weapon which is a mining laser with a modified turn rate of 20 (which is really high), and an arc comparable to my other real weapons.
If it still looses targets despite that, then it looks like its a bug.
It doesn't actually lose target when a target is in sight. The hatch doesn't close prematurely. Sometimes it just doesn't close. And another new target would then make it close. This unreliability is why I am stuck :/
I am sure it's not trigger linking problem as I have 4 of these hatches each manually made and connections checked.
Last edited by AnnihilatorX on Fri Feb 13, 2009 8:01 am, edited 1 time in total.
-
- Commander
- Posts: 116
- Joined: Sat Mar 01, 2008 3:49 am
-
- Commander
- Posts: 116
- Joined: Sat Mar 01, 2008 3:49 am
Got it working thanks.
Basically I utilised 2 oscillating sections to keep a constant barrage of trigger firing. This serves as a memory element required for the triggering sequence. The instant one-off firing of acquired and lost target requires a memory element to keep themselves from interfering with each other too quickly.
What I've done is as follows:
Chronological order:
Pilot dummy targeting weapon
->acquired target
->triggers a oscillating section 1 (quick back and forth rotation)
->rotation reaches CW triggers hatch opening (repeating)
->movement of hatch reaches target ("target" = fully opened position)
->trigger off oscillating section 1 (stops the constant firing of CW trigger)
Pilot dummy targeting weapon
->lost target
->triggers a oscillating section 2 (quick back and forth rotation)
->disables pilot dummy targeting weapon (set to offline)*
->rotation reaches CW triggers hatch closing (repeating)
->movement of hatch reaches origin
-> trigger off oscillating section 2
*is to disallow acquired target to fire and disrupt the closing of hatch
Triggering properties of weapons:
Pilot dummy targeting weapon
- initially online
-trigger ons:
- self frame elapsed = hatch opening time
- hatches movement to origin
-trigger offs:
- oscillating section 2 reaches CW border
Other real weapons:
-initially offline
-trigger ons:
- Movement of hatch reaches target
-trigger offs:
- oscillating section 2 reaches CW border #
# used as trigger off for real weapons other than hatch reaches origin is to prevent firing while hatch is closing
Optionally an "on delay" can be put on both oscillating section to smooth out the opening and closing when enemy keep appearing and disappearing in and out of line of sight, e.g. fighters.
Basically I utilised 2 oscillating sections to keep a constant barrage of trigger firing. This serves as a memory element required for the triggering sequence. The instant one-off firing of acquired and lost target requires a memory element to keep themselves from interfering with each other too quickly.
What I've done is as follows:
Chronological order:
Pilot dummy targeting weapon
->acquired target
->triggers a oscillating section 1 (quick back and forth rotation)
->rotation reaches CW triggers hatch opening (repeating)
->movement of hatch reaches target ("target" = fully opened position)
->trigger off oscillating section 1 (stops the constant firing of CW trigger)
Pilot dummy targeting weapon
->lost target
->triggers a oscillating section 2 (quick back and forth rotation)
->disables pilot dummy targeting weapon (set to offline)*
->rotation reaches CW triggers hatch closing (repeating)
->movement of hatch reaches origin
-> trigger off oscillating section 2
*is to disallow acquired target to fire and disrupt the closing of hatch
Triggering properties of weapons:
Pilot dummy targeting weapon
- initially online
-trigger ons:
- self frame elapsed = hatch opening time
- hatches movement to origin
-trigger offs:
- oscillating section 2 reaches CW border
Other real weapons:
-initially offline
-trigger ons:
- Movement of hatch reaches target
-trigger offs:
- oscillating section 2 reaches CW border #
# used as trigger off for real weapons other than hatch reaches origin is to prevent firing while hatch is closing
Optionally an "on delay" can be put on both oscillating section to smooth out the opening and closing when enemy keep appearing and disappearing in and out of line of sight, e.g. fighters.
-
- Commander
- Posts: 247
- Joined: Sat Jan 31, 2009 1:38 pm
- Location: A clustered inhabitance
Hey, I have a similar problem, although I can't make head or tail about the trigger thing.
Should the trigger be set on the weapon piece or the section? Both exhibit the same trigger panel, and I'm not sure which one is which and vice versa.
Basically, I have a ship that sports a railgun. When the weapon acquires a target, the doors should slide open, and when the target is lost, the doors should close. It partially works (as in it opens when the weapon acquires target, but it keeps on oscilating every 30 frames, and when the target is destroyed/lost, the doors remain stuck open)
I can't find any threads regarding triggers and drivers, so I'm pretty much groping in the dark, using only the Pendulum ship as a guide.
Should the trigger be set on the weapon piece or the section? Both exhibit the same trigger panel, and I'm not sure which one is which and vice versa.
Basically, I have a ship that sports a railgun. When the weapon acquires a target, the doors should slide open, and when the target is lost, the doors should close. It partially works (as in it opens when the weapon acquires target, but it keeps on oscilating every 30 frames, and when the target is destroyed/lost, the doors remain stuck open)
I can't find any threads regarding triggers and drivers, so I'm pretty much groping in the dark, using only the Pendulum ship as a guide.
If admirals hate and trash your ships,
If you can't get it right;
Then off you go, but don't call quits;
Just go make custom sprites.
Solare:
http://www.wyrdysm.com/phpBB3/viewtopic.php?f=2&t=4858
If you can't get it right;
Then off you go, but don't call quits;
Just go make custom sprites.
Solare:
http://www.wyrdysm.com/phpBB3/viewtopic.php?f=2&t=4858
Nice job, AnnihilatorX.
http://www.wyrdysm.com/phpBB2/viewtopic.php?t=3556
Its up there, on the top, first thread, and an announcement too
Are you freaking blind?Silver Swordsman wrote:I can't find any threads regarding triggers and drivers, so I'm pretty much groping in the dark, using only the Pendulum ship as a guide.
http://www.wyrdysm.com/phpBB2/viewtopic.php?t=3556
Its up there, on the top, first thread, and an announcement too