Creation help

Dahcniell

New Member
Reaction score
0
Hi im working on an RPG where u can buy animals that aftera while will duplicate it self, if you know what i mean. I have try to make the trigger but i can inly get it to work for one specific unit :( Would be thankful for your help.
 

Moridin

Snow Leopard
Reaction score
144
Post your trigger(s) up in GUI tags, so we can look them over. If you don't know how:

Right click the trigger heading (above events), select Copy as text.
In the forum type [noparse]
Trigger:
  • <Paste the text here>
[/noparse]
 

Inflicted

Currently inactive
Reaction score
63
um yes, how would u like it to spawn the other unit?
next to or doesnt it matter?

here's a simple solution, sorry that its ruff. and note that it will not work if u plan to use custom values for something else.

time - every 1.0 seconds
conditions - none
actions
- pick all units of type (unit type is "animal1")
set custom value of picked unit to Arithmetic((Custom value of (Picked unit)) +1)
-- if (custom value of (Picked unit) is equal to 15*)
---then create 1 (unit type of (Picked unit)) for (owner of (Picked unit)) at (Position of (Picked unit))
---set Real(Percentage life of (last created unit) to (Percentage life of (Picked unit))
---set custom value of (Picked Unit) to 0.

note that the 15 i chose there is just for example, it is the amount of time until the unit deplicates. the new unit will have the same percentage life as the unit etc.

if you want more than one type, then either change the condition to involve more types or jsut copy and paste it below and set it to the 2nd type.

hope this helped, if i am misunderstanding your problem please clarify. if you do not understand something i have done then please ask, and i will be happy to explain.
 

Dahcniell

New Member
Reaction score
0
After some tries this is what i ended up with
Trigger:
  • birth
    • Events
      • Unit - (Find the unit next to (Center of Rect 008 <gen>))'s mana becomes Greater than or equal to 10.00
    • Conditions
    • Actions
      • Unit - Create 1 Sheep (female) for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
      • Unit - Set mana of (Triggering unit) to 0.00%


note that im not so good with triggers, im more of an illustrator :p
 

educator

New Member
Reaction score
9
another way of doing this (not as good but its easier) is to give the animals a summon spell that summons 1 of that unit type and the time will be the time it takes to get that much mana (thats stupidly hard to understand like that ie. the unit starts with 0 initial mana and a max mana of 100 mana regen of 1 and the summon costs 100 mana and has a duration of 0 (means it infinite)
 

Dahcniell

New Member
Reaction score
0
Do u mean that i shall make an spell like "sheep", which spawns a sheep,
and then make an trigger like every 50 sec make unit cast "sheep"?

Or have i misunderstand you?
 

Inflicted

Currently inactive
Reaction score
63
no, you havent misunderstood him.

but probli easier to set periodic event like every 2 secsonds or something, because it wont cast anyway if there isnt enought mana.

but i would still recomend my method. you dont need custom abilties and alot of triggers.
 
General chit-chat
Help Users

      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