• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need Help on Various Triggers

Status
Not open for further replies.
Level 3
Joined
May 6, 2006
Messages
44
I'm making a map, and i need help on the following things on how to make it work. When I test them and find it 100% works, then ill screenshot the triggers and post here.

1) Vote system to kick a player, also to "duel" against each other, and the duelers are in teh same team , so i guess that for that little time, they will have to change alliance. Also, while they vote, is it possible to pause the whole game, or pause all the units, and maybe triggers.

2) Hero Specific Items, like ranged units can only use certain items, etc.

Code:
Answer by Raszul
 HeroType specific items
i gues you want to use lets say 3 restricted kind of items and one that is free for all.
make each of these 4 types an 'itemclass' (so all melee items are lets say 'charged', all reanged 'campaign', etc)
then, whenever a hero 'aquires an item' check whether the itemclass is an allowed one. if it is, do nothing, else drop the item and 'display text to player' to indicate he wanted to use a forbidden itemclass.

3) Be a certain level in order to use an item


Code:
By Raszul
Event::
- a unti aquires an item
Cond::
//the item is one with a level-requirement
Action::
//do this if-sentence for each item
- if
- - itemtype(of item beeing manipulated) = ...
- - level of (hero manipulating item) <= ...
- then
- - drop item
- else
- - do nothing

4) Players don't attack each other or allies, if they do make a penalty, like a timeout or something

Code:
By Raszul
Event::
- a unit is attacked
Cond::
- owner of (attacking unit) is an ally of (owner of attacked unit)
Action::
//insert the trigger for the penalty here

5) How can i change a hero's model when it turns to lvl 30, but keep its items and stats?

Code:
By Raszul
Somehow, make a Bearform/Metamorphosis skills, replacing and when its Lvl X , order the hero to use it, but make it permanant
Code:
Replace Unit Triggers: It'll change the model and keep the stats (If the second model has same stat growth and base stats as original hero) Only problem with this is that all his abilities become 'unselected' and you have to rechoose them all over again >.<. This will also keep level. (Replace-unit trigger)

Thats all for now, thx in advance
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
1) u can use 'player - set alliance' u just make the two duelling players an enemy. for pause, use pick every unit in game and pause them, then unpause the two duellers

2) dont know :oops: never used it in any of my maps

3) Events: unit acuires item Conditions: item = ..... Actions: if: level of hero manupilating item is equal to or higher then X then: do nothing else: drop item (and display text)

4) i dont rly understand the problem, u mean the enemies should turn into allies after an amount of time?

5) only way is changing the hero to another hero (in object editor the same hero with other model) but drop the items and set lvl to 30 after changing
 
Level 6
Joined
Feb 18, 2005
Messages
263
  1. Vote
    (freqently asked - use the search function next time)
    You can download several vote system in the spell section.
  2. Arena
    (this is after the duelists have been decided)
    Event::
    - whatever
    Condition::
    //no shure about the boolean, might also be 'player'
    - boolean - Player x is an ally of player Y
    action::
    - player X set alliance towards player Y = enemy
    - player Y set alliance towards player X = enemy

    you should set a variable after that to indicate, that they were the same team and after the fight, you should check the variable and if they were allied re-ally them.
  3. HeroType specific items
    i gues you want to use lets say 3 restricted kind of items and one that is free for all.
    make each of these 4 types an 'itemclass' (so all melee items are lets say 'charged', all reanged 'campaign', etc)
    then, whenever a hero 'aquires an item' check whether the itemclass is an allowed one. if it is, do nothing, else drop the item and 'display text to player' to indicate he wanted to use a forbidden itemclass.
  4. Levelrequirement
    this works partially like the trigger above.
    Event::
    - a unti aquires an item
    Cond::
    //the item is one with a level-requirement
    Action::
    //do this if-sentence for each item
    - if
    - - itemtype(of item beeing manipulated) = ...
    - - level of (hero manipulating item) <= ...
    - then
    - - drop item
    - else
    - - do nothing
  5. Friendlyfire
    Event::
    - a unit is attacked
    Cond::
    - owner of (attacking unit) is an ally of (owner of attacked unit)
    Action::
    //insert the trigger for the penalty here
  6. Modelchange on lv X
    there are several ways to do this.
    the easiest might be to store the items and the attributes in variables, drop all items, replace the hero and then give the dropped items back and reset the stats to the old ones.

    Another one is that u create a 'bearform' kind of ability for each hero, give the ability to the hero, ones he reaches lv X and then order it to 'bearform'
    (bearform should then be 'permanent')



i hope this helps you

- Raszul
 
Level 7
Joined
Dec 17, 2005
Messages
337
Actually, easyer than doing the 'bear-form' is just use a 'replace unit' trigger. It'll change the model and keep the stats (If the second model has same stat growth and base stats as original hero) Only problem with this is that all his abilities become 'unselected' and you have to rechoose them all over again >.<. This will also keep level. (Replace-unit trigger)
 
Level 3
Joined
May 6, 2006
Messages
44
Thanks, ill update the first post.

Also, for trigger "Hero changes model at lvl x" will it keep the same stats, even if it used tomes?

P.S., i should of searched for the dialogs, just im too lazy...
 
Status
Not open for further replies.
Top