Doom Angel's Question Thread

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
u mean something like this:
Code:
Every Sec
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        Floating Text - Change the position of <<Floating Variable>> to <<My Unit>> with Z offset 0.00
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
Y exact, I use this 2 for an equal problem.
But maybe you should take a point with a polar offset.
 

Tom Jones

N/A
Reaction score
437
Indeed, with these triggers be very sure that you don't create memory leaks. If I mess up with a timer, I've to shut down wc3 after 30 seconds, even though my computer has over 1 gb memory, and dual core processor.
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
but if i move it on unit it wouldn't make memory leaks would it?

As far as I know it would.
Store this Point in a variable and remove the location afterwads.
You know what I am sure.

Edit: I just read its leak free?
 

Tom Jones

N/A
Reaction score
437
Yea, if you create the texttag on a unit it won't leak. This is the Create Text Tag On Unit action:
Code:
function SetTextTagPosUnitBJ takes texttag tt, unit whichUnit, real zOffset returns nothing
    call SetTextTagPosUnit(tt, whichUnit, zOffset)
endfunction
It points to SetTextTagPosUnit which looks like this:
Code:
native SetTextTagPosUnit takes texttag t, unit whichUnit, real heightOffset returns nothing
No location, no leak.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
nvm i anyway needed to use point so i guess i will just remove the leaks but im having new problem since that im having all that with array so it would be MUI but with Every sec event i can't get in the array sommthing like Triggering player is there any event for a unit moves?
 

Tom Jones

N/A
Reaction score
437
Try this:
event > conditions > actions
A generic unit is issued a point order and A generic unit is issued a target order > order = "move" or order = "smart" or order = "attackmove" or order = "attack" > start timer
A generic unit is issued no point order > order = "stop" or order = "hold" > stop timer
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i didn't realy understand it but it won't be much of help call if some1 order it to move it will move it once and the unit will still walk without the text
 

Tom Jones

N/A
Reaction score
437
Let me elaborate:
When a unit is issued a point or unit target order start the timer, and when a unit is issued stop or hold you should stop the timer.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
nvm i think i solved it out using integer A here's both of the triggers:
Code:
Player Speaks
    Events
        Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
        Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
        Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
        Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
        Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
        Player - Player 6 (Orange) types a chat message containing <Empty String> as A substring
        Player - Player 7 (Green) types a chat message containing <Empty String> as A substring
        Player - Player 8 (Pink) types a chat message containing <Empty String> as A substring
        Player - Player 9 (Gray) types a chat message containing <Empty String> as A substring
        Player - Player 10 (Light Blue) types a chat message containing <Empty String> as A substring
    Conditions
    Actions
        Floating Text - Destroy FloatingChat[(Player number of (Triggering player))]
        Set Loc[(Player number of (Triggering player))] = (Position of SaveLoadPlayerHeroSingle[(Player number of (Triggering player))])
        Set Loc_2[(Player number of (Triggering player))] = (Loc[(Player number of (Triggering player))] offset by (-130.00, 0.00))
        Floating Text - Create floating text that reads ((|cffff0000 + (PlayerName[(Player number of (Triggering player))] + : |r)) + (Entered chat string)) at Loc_2[(Player number of (Triggering player))] with Z offset 150.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set FloatingChat[(Player number of (Triggering player))] = (Last created floating text)
        Floating Text - Show FloatingChat[(Player number of (Triggering player))] for (All players)
        Floating Text - Change FloatingChat[(Player number of (Triggering player))]: Disable permanence
        Floating Text - Change the lifespan of FloatingChat[(Player number of (Triggering player))] to 10.00 seconds
        Trigger - Turn on Move With Hero <gen>
        Custom script:   call RemoveLocation(udg_Loc [GetConvertedPlayerId(GetTriggerPlayer())])
        Custom script:   call RemoveLocation(udg_Loc_2 [GetConvertedPlayerId(GetTriggerPlayer())])
Code:
Move With Hero
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set Loc[(Integer A)] = (Position of SaveLoadPlayerHeroSingle[1])
                Set Loc_2[(Integer A)] = (Loc[1] offset by (-130.00, 0.00))
                Floating Text - Change the position of FloatingChat[(Integer A)] to Loc_2[(Integer A)] with Z offset 150.00
                Custom script:   call RemoveLocation(udg_Loc [GetForLoopIndexA()])
                Custom script:   call RemoveLocation(udg_Loc_2 [GetForLoopIndexA()])
will it be MUI?
 

Tom Jones

N/A
Reaction score
437
Nope, but it's multi player instanceable, meaning that all players can have 1 unit who uses the trigger at once.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
u mean MPI?
if yes than it's k im anyway having only 1 hero for each (it's an RPG)
thanks for ur help +Rep :D
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
sry for bumping but i got another question just for the interest:

would it matter if i have 1 in the array or 100?
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
I think so, there will be saved some place for the usage of the variable.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i mean if i use 1 instead of 100 how much numbers is that like limit the number of arrays or something mabye?
how would i know when to put 1 array or 50 or 100?
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
You know what an array is?

I don quite get your question.

An array is a List of variables each having the same datatype.
With the [ ] you get acces to the specific variable in this list.

Arrays start with [0]

for example

IntegerArray[0] = 100
IntegerArray[1] = 213
etc whatever
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i know that but my question is what's the difference beetwen if i put 1 or 100 in the array?
i don't think blizzard just put so we will have some hard time choosing a number, it must have some purpose....
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Well, the array number can be acquired using a formula, so if you wanted to store something in an array, but didn't know what number it would be, that might be useful... (For example, you want the data to correspond to the player, so you enter (player number) for the array number.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top