wc3edit.net

United Warcraft 3 map hacking!
It is currently April 24th, 2024, 3:23 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: November 30th, 2011, 9:23 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
and who the heck is "GetTriggerUnit()" is there a unit specified? O.o


Top
 Profile  
 
PostPosted: November 30th, 2011, 9:41 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
true, I missed that part. the GetTriggerUnit would have worked if it was a unit-event of any-kind. What you are looking for is probably a GetEnumUnit() which is the unit you picked, although for that to work there is a need a in a loop IIRC...

_________________
Image
Spoiler:
(02:24:09)
Code:
ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).
Code:

(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code:
(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code:
(15:42:51) Lanaya: can i suck , . . .

Code:
(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: November 30th, 2011, 10:01 pm 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2009, 12:46 pm
Posts: 234
Could you model what JJ did for his CP?

Spoiler:
local group godgroup=CreateGroup()
local unit godman
loop
set godman=FirstOfGroup(godgroup)
exitwhen godman==null
blah blah blah
blah blah
endloop

_________________
ImageImageImage


Top
 Profile  
 
PostPosted: November 30th, 2011, 10:10 pm 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
if I remember correctly, it takes the group of units you chose (like if you drag a box around 12 units...)
And it uses the command for the First unit of the group, and after it is done, it loops again and does the same to the 2nd, and again to the 3rd etc... So if you get 12 heroes picked and write -agi 1000, they will all have 1000 agility.

_________________
Image
Spoiler:
(02:24:09)
Code:
ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).
Code:

(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code:
(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code:
(15:42:51) Lanaya: can i suck , . . .

Code:
(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: November 30th, 2011, 10:22 pm 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2009, 12:46 pm
Posts: 234
Was the code I posted correct? Cause I just tried it in-game and still would not spawn :-/

_________________
ImageImageImage


Top
 Profile  
 
PostPosted: November 30th, 2011, 11:37 pm 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
no o.o you didn't define the group...you just created it...
like the repick system, just use the hero var in the save system
or...even easier, just spawn it on the selected hero?


Top
 Profile  
 
PostPosted: December 1st, 2011, 12:42 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
Here is an example code.
Spoiler:
Code:
globals
trigger trgChat=CreateTrigger()
endglobals

function ChatCommands takes nothing returns nothing
local string str=StringCase(GetEventPlayerChatString(),false)
local group grp=CreateGroup()
local unit unt
if str=="-test"then
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Test worked")
endif
call GroupEnumUnitsSelected(grp,GetTriggerPlayer(),null)
loop
set unt=FirstOfGroup(grp)
exitwhen unt==null
if str=="-kill"then
call KillUnit(unt)
endif
call RemoveLocation(GetUnitLoc(unt))
call GroupRemoveUnit(grp,unt)
endloop
call DestroyGroup(grp)
set str=""
set grp=null
set unt=null
endfunction

function main takes nothing returns nothing
local integer looper=0
loop
exitwhen looper>11
call TriggerRegisterPlayerChatEvent(trgChat,Player(looper),"-",false)
set looper=looper+1
endloop
call TriggerAddAction(trgChat,function ChatCommands)
endfunction
didnt test tho.

_________________
Image
Spoiler:
(02:24:09)
Code:
ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).
Code:

(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code:
(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code:
(15:42:51) Lanaya: can i suck , . . .

Code:
(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: December 1st, 2011, 1:39 am 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2009, 12:46 pm
Posts: 234
Wonderful, it worked perfectly haxorico, your 100% pure genius. Thank you everyone who posted here for their feedback and help.

EDIT:Hmm, moving the part that goes into function main into a different call (cause there were some problems with it being in function main) made my -repick command to stop working. I figured it was just string overwrite, so I changed the strings for my godly command, but that didnt seem to help at all, any ideas?

_________________
ImageImageImage


Top
 Profile  
 
PostPosted: December 1st, 2011, 2:43 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
this would be so much easier if you gave us the map but.......

make sure it was actually called?
maybe put a DisplayTextToPlayer() to see if it happened
if not, make it happen...

make sure variable/function names are correct

make sure you actually selected the unit before typing w.e you typed

if you used substrings, make sure end/start # are right


Top
 Profile  
 
PostPosted: December 1st, 2011, 2:52 am 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2009, 12:46 pm
Posts: 234
EDIT: Nevermind, I fixed it, thanks for the ideas nature.

_________________
ImageImageImage


Last edited by Durge on December 1st, 2011, 3:46 am, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)