WYRDYSM GAMES

Home of Battleships Forever
It is currently Tue Dec 12, 2017 4:51 am

All times are UTC + 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Mako's guide to triggers
PostPosted: Tue Feb 17, 2009 11:08 am 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
Read the Documentation first.

*cheers th15 for the sticky :)

Since i've had a few messages on how to use triggers, and have seen very few examples on how triggers work and operate on the forums i've decided to write a pictorial on specific examples of how to use triggers, and how to test them.

Tutorial 1. Weapon recoil
For this example we'll be making a gun that recoils whenever the weapon it's set to is fired

Image


Step 1.

On a new ship create a 'base' section (yellow here) and place a blaster on top of it. This yellow section is static and won't do anything other than hold up the gun.
Image

Step 2.
On the yellow section create a top section. This will be the part of the gun that recoils.
Image

Step 3.
On the left hand panel click edit and you should see a triggers section down the bottom. Change trigger on action 1 to 'weapon fire and trigger off action 1 to Mov.Reach origin (s), leave mode as move.
Image
What does this mean?, the part will enter move mode when the triggered weapon fires, and it will stop moving once it returns to it's starting point.


Step 3.5
On the left hand panel click ED2.
Change target distance to 10 and direction to 180. This results in the part going backward 10 units, then coming back to it's origin.
Set advance frames to 5 and Return frames to 10. This achieves a quick recoil of the top section with a slower return to the origin.


Step 4.

With the top section selected, right click on the blaster and from the context menu press 'Set on trigger 1'


Step 5.
Click on the blaster to select it, then press 'w'. This should place it on the base section and hide it behind the top section.
Image

Testing it.
Press F11 to go into preview mode and keep mashing 'q' to testfire till you get bored


Last edited by Mak0 on Thu Feb 19, 2009 7:34 am, edited 4 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 11:08 am 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
Tutorial 2. Making a bow
Image
This example will be a bow shaped..thing that contracts every time a shot is fired from the triggered weapon. As the weapon reloads for the next shot the bow arms slowly raises to help you know when the next shot is ready.


Step 1.
Onto the main body attach a weapon and a section to be used as a pivot (the red one below), then onto that section attach an arm.
Image


Step 2.
Select the pivot point and change it's settings in edit to as follows:
Image
In the ED2 menu of the pivot in the rotating section, set borders to enabled, CW border to 0 and CCW border to 90.

Now with pivot selected right click on the weapon and press 'set on trigger 1'

If you go into preview mode (F11) and test fire (q) you'll see that for a weapon like a railgun, that our bow arm doesn't give properly reflect the charge up time and fire time.


Step 3.
To time the actions of our arm to the weapon speed click the weapon and go into edit. For a railgun the reload time is 120 frames.
Go back to the pivots' ED2 menu and set CCW Rot frames to 5, and CW Rot frames to 95.
When the weapon is fired, this results in the bow arm quickly drawing back, then slowly returning to the original position before standing still for 20 frames till the next shot.


Step 4.
When you press 'm' to mirror the ship components, the components will have no triggers attatched to them but will retain and inverse their trigger settings (e.g. CW is changed to CCW). All you need to do is click the pivot and set it to trigger 1 on the weapon.


Last edited by Mak0 on Tue Feb 17, 2009 3:48 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 11:08 am 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
Reserved for pictorial goodness


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 3:09 pm 
Offline
Commander
Commander

Joined: Fri Jun 13, 2008 4:37 pm
Posts: 174
Location: Frontlines againest a piggy invasion
Gah! I've been beaten to it! :mrgreen:

Ah well, that just means less work for me to do then. Its not a bad guide though although you should warn them about some of the known bugs like weapon trigger not cloning/mirroring properly.

Don't worry though, if you can handle the basics then that's one less thing I have to cover when I finish my guides. :lol:

BTW, may I have permission to link to your guide? Its good enough to teach people the basics with it.

_________________
Avatarless and proud of it! And being really crazy and screwing everything conventional!
Currently working on:

The largest transforming mecha EVAR!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 3:19 pm 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
Lol, nice name, disgaea fan i assume?

Yeah, was planning on covering the more advanced stuff like rotations, timing and mirroring next.

Feel free to link away :roll:


Top
 Profile  
 
PostPosted: Tue Feb 17, 2009 6:08 pm 
Offline
Moderator
User avatar

Joined: Fri Dec 14, 2007 4:46 am
Posts: 1590
Mak0 wrote:
... and have seen very little information on how triggers work and operate on the forums ...


How about the documentation?

Yes, i know, im pushing it, but i don't want people to get the impression that they can just skip it and feed with guides, or that there should be guides for everything. Thats kind of the vibe your guide gives off. It should be more like read documentation first, then guides.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 8:33 pm 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
Hmm....i see what you mean. In that case i'll leave it at those two examples for those starting with triggers. :mrgreen:

Also, my bad, there is alot of information in the documentation and around the forums on triggers, but not many examples or explanations of how to implement them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2009 2:33 am 
Offline
Vice Admiral
Vice Admiral
User avatar

Joined: Tue Dec 04, 2007 7:31 am
Posts: 1435
Well, How about you Edit the first post with a link to the documentation stating that they should read it first, then give them guides and tuts on how to implement whats there. Some links to good ships that use Triggers and weapon linking would be good as well.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2009 11:17 am 
Offline
Commander
Commander
User avatar

Joined: Mon Feb 16, 2009 10:24 pm
Posts: 145
Location: In America!
Nice tutorial and all - I'd probably use it if I didn't already know how to do that stuff - but you do realize that real bows work the other way?
As in, they contract when being drawn, i.e. reloading, and then spring forward when fired. I'm not trying to insult you, but you may or may not want to change that.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2009 1:46 pm 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
@Blue: Done! thx for the advice

@Paramecium: Yes, i know real bows work the other way ;) hence my stating
Quote:
bow shaped..thing

If it were more accurate to a real bow you just need to turn the CW rot frames to something low so the bow draws and snaps back as soon as it fires.
But for a tute on rotation triggers and syncing'em up to weapon reloads (i.e. a cooldown timer), a slow snap back was more suitable.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2009 6:41 pm 
Offline
Administrator
User avatar

Joined: Sun May 13, 2007 12:01 am
Posts: 947
Good, guide, stickying.

_________________
Sean 'th15' Chan
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 12:08 am 
Offline
Ensign
Ensign

Joined: Mon Mar 09, 2009 12:05 am
Posts: 1
what update do i need to use triggers and add in sprites, and where can i find it?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 12:30 am 
Offline
Commodore
Commodore

Joined: Mon Jun 30, 2008 7:49 am
Posts: 721
Location: "not here" would probably be accurate
www.wyrdysm.com
the download at the top of the page
:wink:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 13, 2009 9:18 pm 
Offline
One-Ban Limit
User avatar

Joined: Wed Mar 11, 2009 10:39 am
Posts: 73
I have a question why is it set to 5 and 95? does it have a reason? or does it have to do with 120?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 15, 2009 7:19 pm 
Offline
Lieutenant
Lieutenant
User avatar

Joined: Tue Feb 17, 2009 6:54 am
Posts: 31
Quote:
For a railgun the reload time is 120 frames.
Go back to the pivots' ED2 menu and set CCW Rot frames to 5, and CW Rot frames to 95.
When the weapon is fired, this results in the bow arm quickly drawing back, then slowly returning to the original position before standing still for 20 frames till the next shot.


So yes, it does have to do with the 120 frames :shock:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group