IS THIS POSIBLE pls help

ss501maku

New Member
Reaction score
0
:) pls help me about this one guys..


Peasant builders can build footman, when the build finish that footman can move, attack, and also can spawn 1 archer every 10sec of game time in owner region 001

when the footman is kill or die, the spawn of archer is also stop

tnx a lot :thup:
 

Necrach

You can change this now in User CP.
Reaction score
62
I think that the smoothest way of "building" a footman is to build a dummy building looking like it (with Map Pathing - None) and when its finished, you replace the building with a unit footman using a replace action
Trigger:
  • footrman
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to FootmanBuilding
    • Actions
      • Unit - Replace (Constructed structure) with a Footman using The old unit's relative life and mana


then for the spawning archers, I don't see exactly what you mean, but use something like
Trigger:
  • spawn
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set tempunitgroup = (Units owned by (Player((Integer A))) of type Footman)
          • Set temppoint = (Center of Region 000 <gen>)
          • Unit - Create (Number of units in tempunitgroup) Archer for (Player((Integer A))) at temppoint facing Default building facing degrees
          • Custom script: call DestroyGroup (udg_tempunitgroup)
          • Custom script: call RemoveLocation (udg_temppoint)

That I made the point in the region temporary is not neccessery, that could be it from start. But I don't know if you want different regions for different players. Then I recommend putting those regions in a Region variable with Arrays, putting the array index to [Loop Integer A] inside the loop, having RegionVariable[1] for Player 1, etc :eek:
 

ss501maku

New Member
Reaction score
0
I think that the smoothest way of "building" a footman is to build a dummy building looking like it (with Map Pathing - None) and when its finished, you replace the building with a unit footman using a replace action
Trigger:
  • footrman
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to FootmanBuilding
    • Actions
      • Unit - Replace (Constructed structure) with a Footman using The old unit's relative life and mana


then for the spawning archers, I don't see exactly what you mean, but use something like
Trigger:
  • spawn
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set tempunitgroup = (Units owned by (Player((Integer A))) of type Footman)
          • Set temppoint = (Center of Region 000 <gen>)
          • Unit - Create (Number of units in tempunitgroup) Archer for (Player((Integer A))) at temppoint facing Default building facing degrees
          • Custom script: call DestroyGroup (udg_tempunitgroup)
          • Custom script: call RemoveLocation (udg_temppoint)

That I made the point in the region temporary is not neccessery, that could be it from start. But I don't know if you want different regions for different players. Then I recommend putting those regions in a Region variable with Arrays, putting the array index to [Loop Integer A] inside the loop, having RegionVariable[1] for Player 1, etc :eek:





what is the variable type for Set tempunitgroup = (Units owned by (Player((Integer A))) of type Footman)
what is the variable type for Set temppoint = (Center of Region 000 <gen>)
 

Necrach

You can change this now in User CP.
Reaction score
62
The tempunitgroup is a Unit Group, and the temppoint is a Point. Its as simple as that :)
 

ss501maku

New Member
Reaction score
0
last question pls. . .

what is this? (all underline) what to do?

Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to FootmanBuilding <<<how?
Actions
Unit - Replace (Constructed structure) with a Footman using The old unit's relative life and mana

and this?


Unit - Create (Number of units in tempunitgroup) Archer for (Player((Integer A))) at temppoint facing Default building facing degrees
Custom script: call DestroyGroup (udg_tempunitgroup)
Custom script: call RemoveLocation (udg_temppoint)

[/WC3]
 

Necrach

You can change this now in User CP.
Reaction score
62
last question pls. . .

what is this? (all underline) what to do?

Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to FootmanBuilding <<<how?
Actions
Unit - Replace (Constructed structure) with a Footman using The old unit's relative life and mana

and this?


Unit - Create (Number of units in tempunitgroup) Archer for (Player((Integer A))) at temppoint facing Default building facing degrees
Custom script: call DestroyGroup (udg_tempunitgroup)
Custom script: call RemoveLocation (udg_temppoint)

[/WC3]

You could skip the first trigger, as Accname said. But what I did was to make a Costum Unit in the Object editor named FootmanBuilding. Meaning, it was a completely home-made unit and just picked from the list, nothing special about it :eek:

To use "For Loop Integer A" when finding a player in the trigger editor, use "Convert Player Index to Player" and then when setting the Integer, use For Loop Integer A. What you do here is equalizing the player number with the current loop. If you don't know how to use loops, search this forum for a tutorial :)

The costum scripts (and why I am using Set Variable actions at all) are to remove leaks. If you don't know what leaks are, again, search this forum for a tutorial ;)

you can just add units to the building list. that works.

Ah, ok, well that was what I thought. Couldn't remember if it was any bug involved with that, though, and didn't want to risk putting a completely wrong advice here :p
 

ss501maku

New Member
Reaction score
0
i don't know this one, i am confusing finding it! pls help?

Unit - Create (Number of units in tempunitgroup)

tnx world editor member
 

ss501maku

New Member
Reaction score
0
if i do this?

The skill like manta/copy/image can auto spawn every periodic of time! like this trigger that copy have a same damage and damage receive of the original copy and move/attack to other region and uncontrollable copy?
 

ss501maku

New Member
Reaction score
0
Just remember, dont double post. DO NOT EVER Quadrople post(4 posts in a row). :mad:


im sorry! :thup:

:thup: I'm just keep practicing triggers and more triggers and learned more :thup:

47208_149092748457438_100000701402753_298688_1363332_n.jpg


58725_149092771790769_100000701402753_298689_4982407_n.jpg


help this problem?
58725_149092775124102_100000701402753_298690_1036798_n.jpg
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
I'm not sure why you have the first problem, but to fix the problem, you should create a trigger that removes a footman from the unit group when it dies.

Also, please read the rules, you must wait 24 hours after the last post before you can 'bump' a thread. Double posting is not allowed (unless it has been 24 hours since your last post), as you can simply use the 'Edit' button.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top