people playing: 256, servers online: 78, games played: 135,931,426 Top Player: Shmevin

  Toribash Community » Toribash » Mods
Register FAQ General Rules Community
Reply
 
Thread Tools Display Modes
Old Feb 26, 2012   #1
ClockworkMonkey
Senior Member
 
Legit White Belt
Join Date: Oct 2007
Posts: 884



~ Mod Triggers Documentation ~
I decided to make a very simple trigger tutorial, for the benefit of the other modders.

So, this isn't an in depth view of how exactly to set them up, but a few preset bits of code you can copy and paste to get a variety of effects.

ok, there are 3 bits of code, I'll call them A B and C

#A
# player 0 wins
trig_id 2
trig_mask 1
trig_action 1

#B
# player 1 wins
trig_id 4
trig_mask 1
trig_action 2

#C
#Target
trig_id 1
trig_mask 6

You can cut and paste these in notepad to the desired objects.

It works like this.

A is the trigger for red player to win

B is the trigger for blue player to win

C is the key that triggers the win (when it contacts with A or B)

So, if you wanted to make it so that the red player would win if he touched a certain object with his head, you would add C to the object in notepad, and A to the players head (in notepad again).

You can experiment with different combinations to achieve different outcomes, I think you can do most of what triggers are designed to do with these 3 bits of code.

CM


Example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~

player 0

body l_hand
#A
# player 0 wins
trig_id 2
trig_mask 1
trig_action 1


body r_hand
#A
# player 0 wins
trig_id 2
trig_mask 1
trig_action 1

player 1

body l_hand
#B
# player 1 wins
trig_id 4
trig_mask 1
trig_action 2

body r_hand
#B
# player 1 wins
trig_id 4
trig_mask 1
trig_action 2


env_obj 1
color 0 0 0 1
flag 8
pos 1 -0.1 5
shape box
sides 0.2 0.2 10
#C
#Target
trig_id 1
trig_mask 6


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


So here, there is an object (object 1) is the key, and the players hands are the triggers. So if player 0 (red) or player 1 (blue) touches object 1 with their hands, they win the match.
<the god> the god
<@Smilies2> modding tiem


Last edited by Smilies2; Dec 22, 2013 at 04:53 PM..
ClockworkMonkey is offline   Reply With Quote
Old Feb 27, 2012   #2
snake
 
Metal Gear Yandere Belt
Join Date: Mar 2008
Posts: 6,022
Clan: fl0w



epic thanks ;)
tell me about aikido
~referencing Dark Souls in suicidal threads since 13/01/15
snake is offline   Reply With Quote
Old Feb 27, 2012   #3
ClockworkMonkey
Senior Member
 
Legit White Belt
Join Date: Oct 2007
Posts: 884



np, added a little example for the more confused members of tb.
<the god> the god
<@Smilies2> modding tiem

ClockworkMonkey is offline   Reply With Quote
Old Feb 28, 2012   #4
fett175
Member
 
Master Belt
Join Date: Feb 2009
Posts: 438



Haha, this would've saved me a bunch of trouble when I made that nfl mod.
Nice tut clock
<fett175> So what you're saying is, I can type whatever I want here and it will be at the bottom of all my posts?... AWESOME
fett175 is offline   Reply With Quote
Old Feb 10, 2014   #5
evrasiasae
Member
 
4th Dan Black Belt
Join Date: Dec 2013
Posts: 153
Clan: Eternity



thank =)
<<Invalid>>
evrasiasae is offline   Reply With Quote
Old Sep 26, 2014   #6
blun7y
Member
 
3rd Dan Black Belt
Join Date: May 2014
Posts: 191



Thank you ClockworkMonkey,

Very simple and clear

Is it as simple doing this within the in-game editor,Or would you recommend sticking to script editing?
blun7y is offline   Reply With Quote
Old Nov 26, 2015   #7
ibra00
Junior Member
 
Black Belt
Join Date: Nov 2015
Posts: 1



bem loko
http://cache.toribash.com/forum/ihtt...tor/smilie.gif
-----
o aqui é todo mundo bichão memoem doido

Last edited by ibra00; Nov 26, 2015 at 03:31 PM.. Reason: <24 hour edit/bump
ibra00 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:43 PM.




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game