Clan TMMM
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The official site of Clan TMMM
 
HomeHomeSearchLatest imagesRegisterLog in


Latest topics
» Kevkevqaz is back
Jass Help I_icon_minitimeby Eat_bacon_daily Wed Feb 22, 2023 7:22 pm

» Hey whats up
Jass Help I_icon_minitimeby seankly Tue Feb 04, 2020 10:32 pm

» Gotta click fast - WC3 Mazing #mildlyinteresting
Jass Help I_icon_minitimeby hoffmann Wed Jun 21, 2017 10:28 pm

» I'm getting married and you guys are invited
Jass Help I_icon_minitimeby Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
Jass Help I_icon_minitimeby Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
Jass Help I_icon_minitimeby Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
Jass Help I_icon_minitimeby Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
Jass Help I_vote_lcap26%Jass Help I_vote_rcap
 26% [ 8 ]
Warcraft 3
Jass Help I_vote_lcap35%Jass Help I_vote_rcap
 35% [ 11 ]
League of Legends
Jass Help I_vote_lcap19%Jass Help I_vote_rcap
 19% [ 6 ]
World of Warcraft
Jass Help I_vote_lcap0%Jass Help I_vote_rcap
 0% [ 0 ]
Diablo 2
Jass Help I_vote_lcap0%Jass Help I_vote_rcap
 0% [ 0 ]
No games at all
Jass Help I_vote_lcap10%Jass Help I_vote_rcap
 10% [ 3 ]
Other game not listed
Jass Help I_vote_lcap10%Jass Help I_vote_rcap
 10% [ 3 ]
Total Votes : 31
Transparency

 

 Jass Help

Go down 
4 posters
AuthorMessage
AmAzIn[G]
Commander
Commander
AmAzIn[G]



Jass Help Empty
PostSubject: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 8:39 pm

I'm making random unit and this is the trigger that dark created for me that did not work.

Spoiler:

And this was the trigger that was to be run when I wanted new units to be created. Ex. Round 1 I would run the trigger, Round 2 I would again run the trigger.

Spoiler:

The info that needs to be added was added and the trigger did not work.
Basically I think it's missing a variable, but yeah, this is what I have.

The trigger needs to be able to give a person a NEW random unit each round so that it is balanced (Kinda, but not really).
And it also needs to be aware of teams, there are 3 teams of 4 players.

And the round should end after a time period of 5-10mins (I can test and decide whats best) or after a certain team kills off the other teams. Ex. Team A and B are dead and one player from Team C is left, team C wins that round and the round is thus restarted. (I want it to end after one team reaches 20 wins.)

Honestly I would do it on my own, but it is just too complicated (I don't program and the only people who can help me only want to use jass, and I already have a limited knowledge of GUI :/)
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 9:06 pm

read chat

(ill edit this with the solution after you respond)
Back to top Go down
AmAzIn[G]
Commander
Commander
AmAzIn[G]



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 10:08 pm

I posted a pic of what it was you asked on the chat.

Apparently you guys talked for 10+ pages since I talked to you at 9pm, so just post here if you need anything else lol.
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 10:16 pm

step 1a:
make a trigger called RandomUnitLibrary
step 1b:
convert that trigger to custom text
step 2:
copy and paste this into that trigger
step 3:
delete the stuff you have in your map header (the stuff that i'm redoing)

Code:

function makeRandomUnitForPlayer takes integer p, rect r returns nothing
   local integer i = GetRandomInt(1, 45)

   call CreateUnit(Player(p-1), udg_u[i], GetRectCenterX(r), GetRectCenterY(r), 270)
endfunction

function InitTrig_RandomUnitLibrary takes nothing returns nothing

   set udg_u[1] = 'n00E'
   set udg_u[2] = 'n00M'
   set udg_u[3] = 'n00F'
   set udg_u[4] = 'n00Q'
   set udg_u[5] = 'n00O'
   set udg_u[6] = 'nOOI'
   set udg_u[7] = 'n005'
   set udg_u[8] = 'n00L'
   set udg_u[9] = 'n00C'
   set udg_u[10] = 'n00J'
   set udg_u[11] = 'n00D'
   set udg_u[12] = 'n00A'
   set udg_u[13] = 'n00N'
   set udg_u[14] = 'n00B'
   set udg_u[15] = 'n007'
   set udg_u[16] = 'n00H'
   set udg_u[17] = 'n004'
   set udg_u[18] = 'n00U'
   set udg_u[19] = 'n00V'
   set udg_u[20] = 'n006'
   set udg_u[21] = 'n002'
   set udg_u[22] = 'n008'
   set udg_u[23] = 'n009'
   set udg_u[24] = 'n00P'
   set udg_u[25] = 'n00R'
   set udg_u[26] = 'n00K'
   set udg_u[27] = 'n003'
   set udg_u[28] = 'e000'
   set udg_u[29] = 'e001'
   set udg_u[30] = 'o000'
   set udg_u[31] = 'u001'
   set udg_u[32] = 'z000'
   set udg_u[33] = 'z001'
   set udg_u[34] = 'z002'
   set udg_u[35] = 'n00G'
   set udg_u[36] = 'n000'
   set udg_u[37] = 'n001'
   set udg_u[38] = 'n010'
   set udg_u[39] = 'n00Y'
   set udg_u[40] = 'n00W'
   set udg_u[41] = 'n00Z'
   set udg_u[42] = 'n00X'
   set udg_u[43] = 'n00S'
   set udg_u[44] = 'n00T'
   set udg_u[45] = 'o002'
endfunction

this should work for the basic stuff you want to do

as for the rest:

making each random unit ~balanced
the easiest way to do it is in how you setup the array
for example udg_u[1] - udg_u[10] will be about equal in strength
and then udg_u[11] - udg_u[20] etc
if you setup the array to be like that (or in sets of 5 or 3 or whatever) ill rewrite the trigger

why does this trigger need to be aware of teams?

the rest is a whole separate deal
it won't be too hard, but just get this working first
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 10:58 pm

Serens code does the same things as Darks, seren just cleaned it up and made it more efficient
So, as dirty and inefficient as what dark gave you is, it shouldve worked

You mustve used it wrong somewhere, or copied it literally (keeping the "gg_rct_PUT REGION FOR PLAYER HERE" with it as well, which i wouldnt be surprised if thats what you did)

As for giving a player a new unit on a new round
You can save the unit they had last round to a variable, and if the number thats randomly generated is associated to that unit then generate another random number until it generates a different unit
So on round 1 it generates 12 and gives w/e unit 12 is, save that to a var, when round 2 starts generate another number, if it happens to be 12 generate another number, if that number is 12 again, generate another number, until it generates a different number, lets say 15, and gives them w/e that unit is
Then round 3 wont give you w/e unit 15 is by the same process (though it will let you get 12 again)
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 11:29 pm

does everything in the map header run at map init?

I thought that the function which sets the array up wouldnt run until called, which it wouldn't be unless amaz specifically told it to
Back to top Go down
AmAzIn[G]
Commander
Commander
AmAzIn[G]



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeWed Aug 17, 2011 11:36 pm

Pat1487 wrote:
You mustve used it wrong somewhere, or copied it literally (keeping the "gg_rct_PUT REGION FOR PLAYER HERE" with it as well, which i wouldnt be surprised if thats what you did)

Anywho, I did it right because I've had to use jass before, but I'll put this shit in tomorrow morning and see if it works. I'm too tired right now and it's late.
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 8:51 am

Serenity09 wrote:
I thought that the function which sets the array up wouldnt run until called, which it wouldn't be unless amaz specifically told it to
Pat1487 wrote:
Amaz mustve used it wrong somewhere

I was including your InitTrig as being more efficient since you dont need to call any function to set up the unit array, but it still does the same thing
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 4:23 pm

i really doubt he called the function

which is kinda funny because originally he said he didn't think the units were being added to the array right
Quote :
Basically I think it's missing a variable, but yeah, this is what I have
and thats exactly what was wrong
Back to top Go down
AmAzIn[G]
Commander
Commander
AmAzIn[G]



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 5:51 pm

Serenity09 wrote:
i really doubt he called the function

which is kinda funny because originally he said he didn't think the units were being added to the array right
Quote :
Basically I think it's missing a variable, but yeah, this is what I have
and thats exactly what was wrong

Back when I was working on it I knew what variable type was missing and I had told dark to add it in there and he said "Oh yeah that could make it work". But then he never logged on again and I wasn't able to do it myself so I abandoned the map. + I didn't have time for it.
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 7:00 pm

Serenity09 wrote:
i really doubt he called the function

Thats what i meant when i said he used it wrong
The part where i said i wouldnt be surprised if he didnt change the regions was a joke
Back to top Go down
AmAzIn[G]
Commander
Commander
AmAzIn[G]



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 7:31 pm

And you guys are right I didn't call the function.

I didn't know really how to call the function because it isn't really a trigger? but it is a trigger?

I don't know what that spot is used for lol.

edit: I put your stuff in seren and I got an error

Jass Help Error10
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 8:39 pm

i cant really tell
but if you have anything in your map header delete it

dont use the map header
its just super sloppy and i dont understand exactly how it works

the map header is where you click the scroll with the name of your map and it opens up the space where all of dark's script is
delete everything in there


Quote :
I didn't know really how to call the function because it isn't really a trigger? but it is a trigger?
its a function
a function is a piece of code which you can call and then it will do whatever it should (not necessarily what you want though)
a trigger has a few components
it has an event
a condition
and an action... action is another word for a function which takes no arguments
ie.
function test1 takes nothing returns nothing
...
endfunction

the event and condition component are exactly what you'd imagine them to be

so to call a function you just type
call <function name>(<arguments>)

so to use test1 (from above it'd be
call test1()

there's nothing in the parenthesis because test1 "takes nothing"

if you're using gui and want to call a jass function you need to make a custom script action which does exactly whats above
Back to top Go down
AmAzIn[G]
Commander
Commander
AmAzIn[G]



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 10:36 pm

Ok this helps.

When I said "I didn't know really how to call the function because it isn't really a trigger? but it is a trigger?"

I was talking about the map header. I had no idea how to make that work as a trigger. I didn't know if it ran on map initialization or if I had to use a trigger to start it. And yeah I didn't think using the map header was a good idea at all ffs it's just confusing.

Thanks though. That tid bit of info you gave me actually helps me understand jass a lot more.
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeThu Aug 18, 2011 11:28 pm

anything that is in the map header is just placed above the rest of the triggers
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeSat Aug 20, 2011 3:28 pm

including libraries with no requirements and initializers?

better question:
why would that be better than using libraries with requirements?
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeSat Aug 20, 2011 3:36 pm

???
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeSat Aug 20, 2011 3:39 pm

all libraries are placed above other scripts automatically
also you can manually order the placement of these libraries using
library xyz requires a, b, c
where a, b, c are also libraries and because xyz requires all of them, they (a, b, c) will be placed above xyz
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
The_Chosen_Oreo



Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitimeSat Aug 20, 2011 5:34 pm

i know that lol i just didnt understand your question xD
Back to top Go down
Sponsored content





Jass Help Empty
PostSubject: Re: Jass Help   Jass Help I_icon_minitime

Back to top Go down
 
Jass Help
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: