Page 1 of 1

Space Sky Questions, COde Question

Posted: Wed Jan 31, 2007 10:49 am
by Ace_Azzameen_5
My code problem:

With the ObjectRepair event, how do I check the which team the repairer is on? I don't know the syntax for the context, or indeed, what to put as it.

Where does a space map keep it's sun settings? Its not in the .sky or in the sky/.req file.

How do I get multiple "Suns" and can I get SWBF2 to perform the background star field creation more than once?

Posted: Wed Jan 31, 2007 11:38 am
by Redline
Look in your Fx there will you find the sun settings

Posted: Wed Jan 31, 2007 11:41 am
by Ace_Azzameen_5
Ahhh, thanks. Theres some stuff I can do some things with. . . ;)

Posted: Tue Feb 06, 2007 11:35 pm
by Ace_Azzameen_5
Can somebody answer my ObjectRepair question?

Posted: Thu Feb 08, 2007 11:23 pm
by [RDH]Zerted
The context is type character which represents the repairer. I think the function GetCharacterTeam( <character object> ) will work. If you are not sure how to use it with the event. Code up what you think it should be, then post it.

[insert random word here]? I pressed the Preview button and it took me to GameToast's main page. Twice! And three strikes your out Mr. Preview button. I hope Submit works...

Edit: Submit didn't work. But when I opened this topic in a new tab, my post was there :emp:

Posted: Sun Feb 11, 2007 2:42 pm
by Ace_Azzameen_5
Weird.

Uh, so,
OnObjectRepair(
function(post)
if GetCharacterTeam (wait, shouldn't your example say "<character team>"?"repairer guy??", 2) then
SetObjectTeam("Rep_roofgun1", 1)
yadayada
else
SetObjectTeam("Rep_roofgun1", 2)--muhahahahhahaha
adayaday
end,
"rep-security"
)


Huh, this is really confusing.
If I stick. . .OH of course, its physically inside the two brackets for the event so the game knows that the character that is mentioned is the one that repaired the object, right.
But still, what do I put for character or object? Do I repeat the event's target object for "object",
and for character you just one "rep" or "1" etc?


Thanks in advance and RASAPSVP Cette acronym est span deux langues!
Teh_Confused_Programmerzorz

P.S.
OnCharacterLandedFlyer(
function (player, flyer)
if IsCharacterInRegion(player, "cis-CP1Con") and GetEntityClass(flyer) == FindEntityClass("commandflyer") then
ShowMessageText("level.acp.invasion.atk.rep", REP)
ShowMessageText("level.acp.invasion.def.cis", CIS)
end
end
)

Just in case I can't apply your repair answer to that. (its a general alert to enemy lander boarding. Since the CIS has no landers, well, flyable ones.. .
Let's just say I'm be using other code for them.