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?
Space Sky Questions, COde Question
Moderator: Moderators
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Space Sky Questions, COde Question
Last edited by Ace_Azzameen_5 on Wed Feb 07, 2007 3:58 pm, edited 4 times in total.
-
Redline
- 2nd Lieutenant

- Posts: 396
- Joined: Tue Jan 16, 2007 4:22 pm
- Projects :: Space to Ground [reworking]
- xbox live or psn: No gamertag set
- Location: The left side of the moon
- Contact:
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
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:
[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:
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
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.
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.
