• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Simple Question :)

Status
Not open for further replies.
Level 9
Joined
Jun 25, 2009
Messages
427
I wanted to ask you. What numbers should i write to see only 3 numbers.

  • Ms Check
    • Events:
      • Player - Player 2 (Blue) writes -ms as an exact match
    • Conditions:
    • Actions:
      • Game - Write to (Triggering Player) (String(Current Movement speed of (Hero <gen>))0,0)
This is nothing compared to the real trigger in my map.

My question is what numbers in the string should i write only to see let's say 300 but not 300.00 :)

Tiche3
 
They are the same. I just used a Paladin which will give 270 ms.
Maybe your doin' sumthin' wrong :/
 

Attachments

  • Untitled2.jpg
    Untitled2.jpg
    48.2 KB · Views: 141
use first the "Convert Integer to String" then choose "Convert Real to Integer" then find unit - movespeed...

100% 3 digit movespeed..
hope it helps.
 
use first the "Convert Integer to String" then choose "Convert Real to Integer" then find unit - movespeed...

100% 3 digit movespeed..
hope it helps.

Ok thanks guys +rep to all i'll try and write it with results :)

EDIT: Yup, it works, i was just too dumb to understand at the first supertoinkz trigger >.>, as i didn't notice the (Integer(Real(Ms of someone))) :)
 
Last edited:
The native GetUnitMoveSpeed and GetUnitDefaultMoveSpeed both return real values, so you'll need to convert from a real to an integer, then from an integer to a string. You could also sub-string the real value and knock off the last 4 characters. ChaosKnight, you might as well have just said:

JASS:
call BJDebugMsg("Your unit has "+YourStringForMoveSpeed+" movement speed.")
 
The native GetUnitMoveSpeed and GetUnitDefaultMoveSpeed both return real values, so you'll need to convert from a real to an integer, then from an integer to a string. You could also sub-string the real value and knock off the last 4 characters. ChaosKnight, you might as well have just said:

JASS:
call BJDebugMsg("Your unit has "+YourStringForMoveSpeed+" movement speed.")

Yup the guys above just said that and i noticed it :)

Anyway, offtopic:

How to write a normal error message like (That target is invulnerable) in a custom script? :)
 
Status
Not open for further replies.
Back
Top