• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[General] world editor questions

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2013
Messages
41
1) How many map initialization triggers should I have, is it ok if I have more than 1?
2) Anytime my UNIT(he’s not a HERO) picks an item (he has the ability to use and benefit from items, just like Heroes do)his HP increases by 4, and it increases with every item he picks up. I can drop the items and pick them up again and he gets another 4 HP and I can repeat that an infinite times… how can I stop him to gain HP?
3) I have in my map a trigger that spawns 4 different types of undeads(a ghoul, skeleton warrior, zombie, zerg) every 1 second over a 5 seconds period (that means 20 units in total per per wave) (PS: this happens once every 50 seconds) and I order them to attack to a random point in a region... my question is: must I have a loc trigger for every undead unit of the wave I send to attack?(4 location triggers) or can I use only 1 loc trigger for all of them and just ''custom_script_remove'' it (I have many other triggers that require locations so is there a way I can use the same loc variable multiple times instead of having 100 loc variables?)
4) How can I lock a certain player (ex: Player 3 (Teal)) from beeing occupied by a player. On my map we are suposed to play just with heroes and player 3 is a Human Base Camp with buildings and units; how can I lock it to be unplayable by a player? (when I host it, players can just get on slot 3 and play as that camp)
5) Does anybody know a good rogue\assassin model? There used to be a WoW rip of a female orc(if I'm not mistaken) rogue with bloodfang armor set on the hive but it got removed :ogre_rage:
 
1. As less as possible I would say, only if you really want to... for an extra system for example.

2. Make unit lose 4HP if it drops/loses item.

3. You only need 1 point variable, but always call RemoveLocation after you used one loc. (If you want all units attack same point, you only need to remove location after last action)

4. Change the slot status for Player 3 in scneario --> player settings (from default it's 'User')

5. Look for it in model section.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
1) How many map initialization triggers should I have, is it ok if I have more than 1?
You can ahve as many as you want. Though it is not recomended. And remember: They fire by order of creation. The older triggers with same event will fire first.
2) Anytime my UNIT(he’s not a HERO) picks an item (he has the ability to use and benefit from items, just like Heroes do)his HP increases by 4, and it increases with every item he picks up. I can drop the items and pick them up again and he gets another 4 HP and I can repeat that an infinite times… how can I stop him to gain HP?

I... don't rly get what you have done ? Whenever the unit picks an item it gets 4 hp... how ? Trigger ? Boost item ? Ability ?
3) I have in my map a trigger that spawns 4 different types of undeads(a ghoul, skeleton warrior, zombie, zerg) every 1 second over a 5 seconds period (that means 20 units in total per per wave) (PS: this happens once every 50 seconds) and I order them to attack to a random point in a region... my question is: must I have a loc trigger for every undead unit of the wave I send to attack?(4 location triggers) or can I use only 1 loc trigger for all of them and just ''custom_script_remove'' it (I have many other triggers that require locations so is there a way I can use the same loc variable multiple times instead of having 100 loc variables?)

Just open any map which does something similar and see how it happens.
You may preset the variable points which you do not delete, never, or use a few "Temporal" variable which you clean each time they are used.
4) How can I lock a certain player (ex: Player 3 (Teal)) from beeing occupied by a player. On my map we are suposed to play just with heroes and player 3 is a Human Base Camp with buildings and units; how can I lock it to be unplayable by a player? (when I host it, players can just get on slot 3 and play as that camp)
No triggering needed:
Sceneraio >> Player Properties >> There is column called "Controller" Swap him to computer.
 
Level 3
Joined
Jul 26, 2013
Messages
41
  • attack H spawns S
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set UD_Attack_loc = (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Skeleton Warrior for Player 12 (Brown) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To UD_Attack_loc
      • Custom script: call RemoveLocation(udg_UD_Attack_loc)
      • Set UD_Attack_loc = (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Ghoul for Player 12 (Brown) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To UD_Attack_loc
      • Custom script: call RemoveLocation(udg_UD_Attack_loc)
      • Set UD_Attack_loc = (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Zombie for Player 12 (Brown) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To UD_Attack_loc
      • Custom script: call RemoveLocation(udg_UD_Attack_loc)
      • Set UD_Attack_loc = (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Zergling for Player 12 (Brown) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To UD_Attack_loc
      • Custom script: call RemoveLocation(udg_UD_Attack_loc)
      • Set UD_Attack_loc = (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Ghoul for Player 12 (Brown) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To UD_Attack_loc
      • Custom script: call RemoveLocation(udg_UD_Attack_loc)
      • Set UD_Attack_loc = (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Zombie for Player 12 (Brown) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To UD_Attack_loc
      • Custom script: call RemoveLocation(udg_UD_Attack_loc)
  • attack H spawns S 2
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Zergling for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Ghoul for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Skeleton Warrior for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Skeleton Warrior for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Zombie for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Zergling for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
      • Unit - Create 1 Ghoul for Player 11 (Dark Green) at (Random point in Undead Spawns S <gen>) facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To (Position of (Random unit from (Units owned by Player 3 (Teal))))
Does the new trigger look ok? I think I'm still leaking a loc there when I spawn the undeads??
 
It's not 'remove trigger' its remove location. And no it won't bug, do it like this:
  • Set loc = RandomPointInRegion_1
  • Unit - Create Skeleton Warrior for Player 12 (Brown) at loc facing 0 degrees
  • Custom script: call RemoveLocation(udg_loc)
  • Set loc = RandomPointInRegion_2
  • Unit - Order (Last created unit) to Attack-Move To loc
  • Custom script: call RemoveLocation(udg_loc)
_________________________________________________

But you could code it better with using a loop:
  • For each Integer I from 1 to 6 do Actions:
    • Set loc = RandomPointInRegion_1
    • Unit - Create 1 UnitType[I] for Player 12 (Brown) at loc facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_loc)
    • Set loc = RandomPointInRegion_2
    • Unit - Order (Last created unit) to Attack-Move To loc
    • Custom script: call RemoveLocation(udg_loc)
That would be the code for all your 6 spawns + attack.

Initilisize the Unittype[array] variables in an Init-trigger:
  • Set UnitType[1] = Skeleton Warrior
  • Set UnitType[2] = Ghoul
  • ... and so on
 
Level 3
Joined
Jul 26, 2013
Messages
41
that's so awesome :D.. I had to copy paste for each type of unit I wanted to make.. that will come in handy.
PS: I meant ''remove variable loc'' (not ''remove trigger'') my bad
 
Level 3
Joined
Jul 26, 2013
Messages
41
Initilisize the Unittype[array] variables in an Init-trigger:
  • Set UnitType[1] = Skeleton Warrior
  • Set UnitType[2] = Ghoul
  • ... and so on
[/QUOTE]

When I select the ''Unit-Type'' variable do I have to thick ''Array'' ? I'm not sure..
Do I make an integer variable or unit type variable? o_O
 
Status
Not open for further replies.
Top