set point help

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Dark_coolness
Junior Member
Posts: 34
Joined: August 12th, 2008, 9:35 pm

set point help

Post by Dark_coolness »

i have this trigger

Code: Select all

Set point[1] = ((Position of CastingUnit) offset by 400.00 towards ((         ) + 1.00) degrees)
but where it says nothing i want to have it say towards ((point[1])
but i cant find out how to put it in.
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: set point help

Post by Syre »

Well that wouldent work, since your setting point1 right there in that trigger. Lol. So basicly, you cant set it, because point1, at that time, doesnt exist. Plus, that blank spot only works with numbers...so just try a few different degrees till ya get your desired result.
Image
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: set point help

Post by Ken »

You'd wanna do this instead:

Set point[0] = ((Position of (Casting unit)) offset by 400.00 towards ((Angle from (Position of (Casting unit)) to point[0]) + 1.00) degrees)

As Syre noted, the blank in what you had takes a real variable type, not a point.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
Dark_coolness
Junior Member
Posts: 34
Joined: August 12th, 2008, 9:35 pm

Re: set point help

Post by Dark_coolness »

K ill tell you what i am doing to make this easier. I am making a spell that makes 8 footmen offset 400
from the casting unit at the degrees 0,45,90,135,180,225,270,315, after the units are created i want then to spin around the casting unit and if possible not that important they could stay facing the casting unit.
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: set point help

Post by Ken »

This would be more fun in JASS.
Spoiler:

Code: Select all

globals
trigger t = null
endglobals

function cond takes nothing returns boolean
return ( GetSpellAbilityId() == 'ANfs' ) 
endfunction

function act takes nothing returns nothing
local integer ii = 0
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(GetTriggerUnit())
local location l
loop
exitwhen ii > 7
set l = PolarProjectionBJ(GetUnitLoc(u), 400.00, I2R(ii*45))
call CreateUnitAtLoc( p, 'hfoo', l, AngleBetweenPoints(l, GetUnitLoc(u))) 
set ii = ii + 1
endloop
endfunction

function main takes nothing returns nothing
local integer ii = 0
loop
exitwhen ii > 11
call TriggerRegisterPlayerUnitEvent( t, Player(ii), EVENT_PLAYER_UNIT_SPELL_FINISH, null )
set ii = ii + 1
endloop 
call TriggerAddCondition( t, Condition(function cond) )
call TriggerAddAction( t, function act )
endfunction
Tested. When you finish casting the spell, a single footman will spawn at each of the angles you specified.

Change 'ANfs' to the ability you want to have trigger it.

I'm currently working on something to have them rotate... But no promises on that being done tonight, or ever. :D

It'll be done by tomorrow.

EDIT: Oh, and to put that into your map... Make a new trigger called what you want it to be. Select the trigger, then select Edit->Convert To Custom Text from the top menu. Remove everything above the line of //===============, and replace it with functions cond and act from above. Below the line, put in what's in function main, and change "t" to gg_trg_x, replacing x with what you named the trigger.

Hopefully those instructions aren't too confusing. I'll make a picture if you need.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
Dark_coolness
Junior Member
Posts: 34
Joined: August 12th, 2008, 9:35 pm

Re: set point help

Post by Dark_coolness »

when i try to run it i get these three lines with the error "expected end of line"
Spoiler:

Code: Select all

//===========================================================================
globals
trigger gg_trg_trigger = null
but i don't know why i get the errors
also it might just be easier for you to do the triggers then just put the map as an attachment
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: set point help

Post by Ken »

Oh, you don't need the globals stuff... That's just 'cause I do my things in JassCraft, and I need to declare a trigger.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that