Tutorial How to make a random ability

R

Ricky

Guest
Hi~Ricky
This is my first tut so any comments are welcome and feedback would be great.:)
In this tut im going to say how to make an ability were if you use it a random thing will happen out of as many things as you like.:rolleyes:
we are going to do it using triggers.But first we need the ability so open up map editor an create a new map. First make a new unit to use the ability (optional) Then we make a new ability. make its base the naga summoner ability i think it was called summoning ritual and its description was summons energies from the twisted nether or something. anyways change the name and description to your liking.But dont change anything else. Now open the trigger editor and make a new trigger (i called mine first preperation) put the events as a unit startes casting an ability and put conditions as ability being cast equal to <your ability>

Code:
[COLOR="Blue"][U]Trigger 001[/U]
          Events 
              A unit starts casting an ability
         Conditions
             Ability being cast equal to <ur ability[/COLOR]>
Then open the variable editor and creat a new integer (i named mine ability one)it doesnt need to be an array. Put starting value as 0 (it should start like that) Now go back to the trigger editor and to your made trigger. now change the actions. Make a set variable trigger and make the trigger look like the following:

Code:
[COLOR="Blue"]Tri[U]gger 001[/U]
          Events 
              A unit starts casting an ability
         Conditions
             Ability being cast equal to <your ability>
         Actions
            set variable <your variable name>=random number between <how many randomised things that can happen you want> (example: random number between 1 and 5)[/COLOR]
Now we need The thing that makes it all work:More triggers (Note:This is just how i do it i expect there are many more ways)Say you wanted only to things for it to possably be then you make two triggers and put them initialy off then leave them and go back to your first trigger.
Now we make more actions. add the action if/then/else under general and make the conditions (or the if) if integer value is 1. Then under the <Then>
Turn on trigger <one of your possable ability triggers mines called ability outcome one> Then under <else> make another if/then/else action but this tiem make the if conditions as if the value of <your variable> is 2 .And the then actions as turn on trigger <the name of ur other ability outcome mines called ability outcome 2> and repeat the porcess untill you turn on the amount of triggers u want to be the amount of outcomes. Ex: Iwant three outcomes on mine.

Code:
[COLOR="Blue"][U]Trigger 001[/U]
                events
                      a unit begins casting an ability
                 conditions
                      ability being cast equal to Random outcome ability
                  actions
                  Set value of variable 001=random number between 1 and 3
                    If/then/else
                      if
                        Value of variable 001 equal to 1
                      then
                        Turn on trigger outcome possability 1
                      else
  if/then/else
     if
       value of trigger 001 equal to 2
     Then
       Turn on trigger outcome possability 2
     else
  if/then/else 
     if
        value of trigger 001 equal to 3
    Then 
       turn on trigger outcome possability 3
     else
       do nothing[/COLOR]
Now all we have to do is finish the triggers that let the outcomes happen But first we need to do one last thing place in the unit that uses the ability a lot of problems come from that for instance only that specific unit can use the ability but thats how i make maps and remember this is only one way of doing it. now to finishe the triggers we have go to put in the events i put in time elapsed 0.01 seconds
then you put in the actions what you want to happen if this outcome happens .
for example

Code:
[COLOR="Blue"]trigger outcome possability 1
          events
             elapsed time 0.01
          conditions

          actions
            set (unit_ability unit001) life percent to 100%.[/COLOR]
Another thing you could do as actions is give the triggering unit an ability wait for _____seconds then take the ability off it again.

If all is done well this is what shoul happen in-game

A player clicks the ability the integer randomises itself then the trigger finds which number the integer has landed on then it carries out what happens.

Well i think i have covers the way i make random abilities. I hope that you found this tut usefull and that you will reply to this tut and give me feedback.:) ~Ricky A.K.A Tichondrias NOTE: This tut(tutorial) uses only one way of doing this there are i expect a lot more ways. The way i have stated in this tut is just the easyest for me and i though that it would make more sense to some poeple then other ways would.
 
Reaction score
333
1. There is no need to run additional triggers, the actions can be executed under the if/then/else statement.

2. You should use run trigger instead of turn on trigger if you wish to run a trigger.

3. (Triggering Unit) will be null in the trigger "outcome possability 1".

4. You should use "starts the effect of an ability" as opposed to "begins casting an ability".

5. Your if statements should probably be nested (assuming they aren't already).

6. When you are making a tutorial or formal article, it is important to put effort into your spelling, layout, grammar, punctuation and capitalization. No one demands perfect English, but it is much easier to read and understand.
 
R

Ricky

Guest
Seven points

1. There is no need to run additional triggers, the actions can be executed under the if/then/else statement.

2. You should use run trigger instead of turn on trigger if you wish to run a trigger.

3. (Triggering Unit) will be null in the trigger "outcome possability 1".

4. You should use "starts the effect of an ability" as opposed to "begins casting an ability".

5. Your if statements should probably be nested (assuming they aren't already).

6. When you are making a tutorial or formal article, it is important to put effort into your spelling, layout, grammar, punctuation and capitalization. No one demands perfect English, but it is much easier to read and understand.

1. There may be no need for some things but if u want to give a unit an ability then have additional actions to take it away its harder for me to do it that way.

2.I was thinking that when i was typing it in but i decided to keep it the same couse thats how i do it on my maps and it workd fine.

3.Again it works fine for me the way i did it.

4.Once again it works for me the way i did it

5.Fair enough i should maybe have used better english but i have several points to make here.: 1. I am actually doing four things here. one writing this tut. Two sorting out a website for me friend. Three trying to play medieval 2 total war. and four trying to give a guy advice over Xfire. Why do it all at the same time? You may ask well the answer is i cant do it at any other time Soon

6. I will change it to satisfy the things u have stated up to a degree were i can. If i dont change it will be beacuse im too busy. or i think i dont need to and it is fine as it is.

7. im sorry if you think that i havnt changed what i should
 

ianu74

New Member
Reaction score
8
1. Try to use The CODE tags for your trigger codes... i can't read properly.
2. I don't understand why you need
trigger outcome possability 1
events
elapsed time 0.01
conditions

actions
set (trigerring units) life percent to 100%.
 
R

Ricky

Guest
because

ok i got it because it is an example of one of the outcomes you could do.
Iv put the code tage around it soz bout that.
 
Reaction score
148
The last trigger is very odd.

What does it do?

After one second the game has started, it sets the life of non-existant unit (Because there is no triggering unit in that trigger) life to 100%?
 
R

Ricky

Guest
Oops

Oh yeah soz a bout that i forgot u have to place the unit and select the unit.
I know that means the ability only works for a ready made unit. but its just the way i make maps really soz:banghead:
 
Reaction score
65
Wasn't very useful. The triggers are, as said above, quite basic and they could had been done alot better.
 
R

Ricky

Guest
Wasn't very useful. The triggers are, as said above, quite basic and they could had been done alot better.

Fair enough. Yes the triggers could have been done better i know couse i can do it but now i shall state why i did it like that:

1.Some people find this way easier to understand and when they get the hang of my way they are more likely to understand other ways.:) 2.I just make maps that way.I find it quicker and easier than the other ways and for me it works better too and that made me think that it must be easier for at least a few more people than myself.:rolleyes: 3.I also couldnt find one tutorial were it tells you how to make random abilities so i thought that i should make a baisic one:D
4.I think that it was usefull for some people. As most people who look for tutorials dont know how to make any kind of map at all so if i had used more advanced triggers they might not have understood.:confused:
 
Reaction score
333
1. There may be no need for some things but if u want to give a unit an ability then have additional actions to take it away its harder for me to do it that way.

2.I was thinking that when i was typing it in but i decided to keep it the same couse thats how i do it on my maps and it workd fine.

3.Again it works fine for me the way i did it.

4.Once again it works for me the way i did it

5.Fair enough i should maybe have used better english but i have several points to make here.: 1. I am actually doing four things here. one writing this tut. Two sorting out a website for me friend. Three trying to play medieval 2 total war. and four trying to give a guy advice over Xfire. Why do it all at the same time? You may ask well the answer is i cant do it at any other time Soon

6. I will change it to satisfy the things u have stated up to a degree were i can. If i dont change it will be beacuse im too busy. or i think i dont need to and it is fine as it is.

7. im sorry if you think that i havnt changed what i should

All points taken, but just because something "works" doesn't mean it works well. If every single map maker went through their maps using inefficient code, the lag would be intolerable. If every one went for that same bare minimum, society would quickly break down.

The fact that something works should not be the soul justification for using it. It needs to also work well.
 
R

Ricky

Guest
Good point but......

The fact that something works should not be the soul justification for using it. It needs to also work well.

That is a very good point but as i have said before this is only baisic and i mainly did it so others would get the hang of making one that as you said doesnt work well. So they can grasp how to make a more advanced one.:)

Note: A quick note if you are going to leave a comment: Please if it is crititism which i really dont mind make it constructive like this persons comment:)
 
R

Ricky

Guest
I have something to say

I just want to state that i am in the progress of making more tuts and i have already finished one: 2 in 1 Doodad Tutorial:)
 
R

Ricky

Guest
Hi

Hi~Ricky

Hi evryone im just going to say that in members projects area my new map "The Battle of Hastings" is there please go and have a look (it comes with download)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top