• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

ordering a fake order somehow

Status
Not open for further replies.
Level 20
Joined
Apr 14, 2012
Messages
2,901
o_O what would that help me in????
I want to know if it is possible to order a unit to target terrain with firebolt (example) with triggers

That is the way. The dummy unit's scaling size would be 0.00 in Object Editor, so that it would look invisible.

The next step is done in the Trigger Editor. For example:
  • Target Terrain
  • Events
  • Conditions
  • Actions:
  • Set Point = Center of (Playable Map Area)
  • Unit - Create 1 Dummy at Point facing Default Building Facing degrees
  • Unit - Order YourUnit to Firebolt Dummy
  • Custom Script: call RemoveLocation(udg_Point)
Now since the dummy is really small it would look like that the firebolt hit the Center of the Playable map area.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
That is the way. The dummy unit's scaling size would be 0.00 in Object Editor, so that it would look invisible.

The next step is done in the Trigger Editor. For example:
  • Target Terrain
  • Events
  • Conditions
  • Actions:
  • Set Point = Center of (Playable Map Area)
  • Unit - Create 1 Dummy at Point facing Default Building Facing degrees
  • Unit - Order YourUnit to Firebolt Dummy
  • Custom Script: call RemoveLocation(udg_Point)
Now since the dummy is really small it would look like that the firebolt hit the Center of the Playable map area.

what you said is impossible, world editor does not allow a unit that has a scale of 0.00

mckill2009
do you want to hit the unit and the terrain at the same time?, if so why dont you use a custom dummy missile?...

i don't want it to do anything but display the error message that says: Must target a unit

I already have the custom error message system :ogre_hurrhurr: but i want to know if what i said is possible
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
Okay so just make it 0.10 scale or make the unit invisible via Animation - Change Vertex Coloring.

This won't change anything... sorry

Dr Supper Good
will it be like this:
JASS:
call IssuePointOrderLocBJ( GetTriggerUnit(), "firebolt", GetRectCenter(GetPlayableMapRect()) )

NOTE: the function was not detected as "Error" in the trigger... gona test it
 
use this example...too lazy to remove leaks and so on...
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to firebolt (Neutral Hostile)
    • Actions
      • Unit - Create 1 DUMMY for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add cs (Neutral Hostile) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm (Position of (Target unit of ability being cast))
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
use this example...too lazy to remove leaks and so on...
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to firebolt (Neutral Hostile)
    • Actions
      • Unit - Create 1 DUMMY for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add cs (Neutral Hostile) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm (Position of (Target unit of ability being cast))

you got it all wrong.... i don't want to make a missile to the position of a unit... i only want the error message :ogre_frown:

and btw for the jass thing, didn't do anything in game

Hmm, basing the new Firebolt in a Carrion Swarm is a good idea actually!

AGREE :ogre_hurrhurr: :thumbs_up:
 
coz you said...
order a unit to target the terrain (the carrion swarn sample)
with a unit-target spell (firebolt sample)

but anyway there's a snippet of vexorian called SimError...maybe it can help you...
JASS:
library SimError initializer init
//**************************************************************************************************
//*
//*  SimError by Vexorian
//*
//*     Mimic an interface error message
//*       call SimError(ForPlayer, msg)
//*         ForPlayer : The player to show the error
//*         msg       : The error
//*    
//*     To implement this function, copy this trigger and paste it in your map.
//* Unless of course you are actually reading the library from wc3c's scripts section, then just
//* paste the contents into some custom text trigger in your map.
//*
//**************************************************************************************************

//==================================================================================================
    globals
        private sound error
    endglobals
    //====================================================================================================

    function SimError takes player ForPlayer, string msg returns nothing
        set msg="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00"+msg+"|r"
        if (GetLocalPlayer() == ForPlayer) then
            call ClearTextMessages()
            call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
            call StartSound( error )
        endif
    endfunction

    private function init takes nothing returns nothing
         set error=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
         //call StartSound( error ) //apparently the bug in which you play a sound for the first time
                                    //and it doesn't work is not there anymore in patch 1.22
    endfunction

endlibrary
 
Status
Not open for further replies.
Top