Welcome! Please Login or Register!
April 20, 2024, 04:33:19 AM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Custom Triggers 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: 1 [2] Print
Author Topic: Custom Triggers  (Read 8457 times)
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #15 on: July 14, 2009, 02:37:52 PM »

Ok, been away a while, busy and such, as I'm sure you are too. I've recently taken a new look at the BloodSport and noticed a few things.

First off there was something I knew nothing about: Rules. From what I can see they go as such:

rule #name of rule# #interval speed# #active/inactive# {
rule code
}

I used # just to distinguish between actual code and my paraphrasing. Thinking this is similar to the code I've used before, for example:

void name(int variables){
code
}

Thinking it's similar to that, I don't know anything about the rules. I don't know what the syntax is, what my options are, if I need to start the rule name with an _ or not. I don't even know what they are for, or how to use them. Looking at your Castle Blood script I see you use it once, but only in your "endGlobals", which actually doesn't seem to do a thing unless 1==0
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #16 on: July 14, 2009, 06:47:01 PM »

Those are for creating triggers.  You notice similar settings like speed, inactive/active.  They weren't necessary because I just created triggers the old-fashioned way via rm-commands.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #17 on: July 16, 2009, 11:06:14 AM »

So each rule is a trigger? like the rule will have if() statements to set as conditions and the effects are in the {} brackets accordingly? I noticed speed, but what options do I have for the speed? and if I set it to inactive how do I activate it (assuming there is a way)?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #18 on: July 16, 2009, 08:35:01 PM »

Activate it the same way you activate any trigger - fire event.

The if statements are not unique to rules - after you type up the rule, it's just regular trigger code afterwards.  Create conditions and effects just like regular conditions effects - use the trCommands.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #19 on: September 08, 2009, 05:03:00 PM »

Ok. I was working on a map and realised it would be soooo much better with store islands and such. BUT I can't figure out that equation you used to set the areas circular according to player areas! This is one of them I found in Castle Blood:

(rmPlayerLocXFraction(i)-0.5)*(0.5 + rmXTilesToFraction(30))/0.5+0.5)

This is just the one for an X location, the Z location is only slightly different. But how can I work with that? I mean I understand a bit of it, and with alot of bad tweaking I can get what I want, but I was hoping you knew alot more about it. I just want to know what I can change and how much of an effect the change will have.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #20 on: September 08, 2009, 05:12:56 PM »

Oh, and I was just checking out your scripting info bit here, and I noticed a few things if you want to update it. I actually found a complete list of rm and xs functions you can use, or at least a bigger list than the one on the Hyena Studios tutorial, and I found it within the AoE code so I'm assuming it's complete. Unfortunately it doesn't explain the input values, except to give you what type it is (like string vs int) If you are interesed.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #21 on: September 08, 2009, 07:01:52 PM »

You want to edit the value 30 to see how it fits your needs.

I don't use the list on Hyena Studios.  There is a more complete list in the documentation in AOM and there was an additional list online at http://www.beerinhand.com/aom/reference.txt but it's no longer up.  You can always just dig through existing scripts if you want to keep looking though. Tongue
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #22 on: September 09, 2009, 04:10:08 PM »

Thanks, I'll see how it goes.

No, I'm saying I have one, and it works great, I use it all the time. It's actually from those strange text files in the RM folder, if you've ever noticed them. I was curious one day and opened it up to see what was inside, didn't see anytihng important until I got near the bottom, it was a huge list of useable functions.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #23 on: September 09, 2009, 11:20:47 PM »

Yes, that sounds similar to the one ES left for AOM (it was in a game folder).
Logged
Pages: 1 [2] Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  Custom Triggers « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.13 seconds with 21 queries.