• 🏆 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!

Advanced help Please

Status
Not open for further replies.
Level 5
Joined
Sep 8, 2004
Messages
98
My Questions:

1. How do i make a missle launch from a region or a doodad? (as in Maze of Lava)

2. How do i make certain terrain change? (from lava to dirt) And only when it is lava that if a unit enters it, it dies?

3. How do i make a weapon that automatically fires? (Battleships, Tank Wars)

Also, if you have questions, i'm pretty good with the world editor, and i might be able to answer them. Some advanced, i can't answer though, like storing caches, campaign, and stuff like that.
 
Level 22
Joined
May 11, 2004
Messages
2,863
A. Have an invisible unit there that can shoot.

B. there is a trigger, I believe unter environment or game, that allows you to change areas of texture. Just use the periodic event or unit dies even to trigger a terrain change at the position of the hero unit.

C. those are all modifications of then "barrage" passive ability.
-VGsatomi
 
either make a "death region" that you just put where the lava is and put the unit type that should die when they enter the region or you can do the terrain trigger that detects if unit is on special type on ground = kill but that can make lots of lag im afraid.

Anyways heres both triggers!

Death region:

event: Unit - A unit enters region 001 <gen>

condition: (owner of (triggering unit)) not equal to playr12 (dark green) (this could be done in many ways, just showing one :) )

actions: unit - kill (triggering unit)

Terrain Kill

event: Time - Ever 0.01 seconds of game time

condition: none

action: Unit Group - Pick Every Unit In (Units Owned By Player1 (red)) And Do (Actions)

loop actions: If (All conditions are true) then do (then actions) else do (else actions)

if - conditions: (Terrain tyoe at (Position of (Picked unit))) Equal to Ashenvale - Vines (just an example)

then actions: Unit - Kill (picked unit)

else actions: Do nothing



This is just the basic for one player. :)
 
Level 7
Joined
Aug 5, 2005
Messages
218
Your terrain trigger lags because there is no fix for memory leaks, and the periodic doesn't have to be so small. This is mine.

Code:
Lava Kill
    Events
        Time - Every 0.12 seconds of game time
    Conditions
    Actions
        Set tempGroup = (Units of type Runner)
        Unit Group - Pick every unit in tempGroup and do (Actions)
            Loop - Actions
                Set tempPoint = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is alive) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Terrain type at tempPoint) Equal to Dungeon - Lava
                                (Terrain type at tempPoint) Equal to Icecrown Glacier - Ice
                    Then - Actions
                        Unit - Kill (Picked unit)
                    Else - Actions
                Custom script:   call RemoveLocation(udg_tempPoint)
        Custom script:   call DestroyGroup(udg_tempGroup)
 
Level 4
Joined
Jul 19, 2005
Messages
90
making items auto attack is easy, use the phoenix flame ability, this will cause the item to shoot out missles to a unit thats in range
 
Level 5
Joined
Sep 8, 2004
Messages
98
Thanks, guys. I figured out the attack ground, you just give the unit the locust ability, making it so it can't be selected, and just use triggers to make the unit auto attack certain regions.

I am deciding against the terrain though, because i dont know much JASS and i dont want memory leaks. Thanks again!
 
Status
Not open for further replies.
Top