Space Sky Questions, COde Question

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Space Sky Questions, COde Question

Post 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?
Last edited by Ace_Azzameen_5 on Wed Feb 07, 2007 3:58 pm, edited 4 times in total.
Redline
2nd Lieutenant
2nd Lieutenant
Posts: 396
Joined: Tue Jan 16, 2007 4:22 pm
Projects :: Space to Ground [reworking]
Games I'm Playing :: Different Games
xbox live or psn: No gamertag set
Location: The left side of the moon
Contact:

Post by Redline »

Look in your Fx there will you find the sun settings
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

Ahhh, thanks. Theres some stuff I can do some things with. . . ;)
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

Can somebody answer my ObjectRepair question?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Post 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:
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post 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.
Post Reply