Effect not showing up.

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
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Effect not showing up.

Post by myers73 »

Im testing how to get effects ingame to improve surroundings and ran into a problem, its not showing up.

LUA (the part that pertains to this)
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)

-- AttachEffectToMatrix(CreateEffect("com_sfx_explosion_xl"), GetPathPoint("fire_test", "node 0"))

FecLoc = GetPathPoint("fire_test", "node 0")
AttachEffectToMatrix(CreateEffect("com_sfx_explosion_xl"), FecLoc)
end


---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
my path and node_0
Hidden/Spoiler:
Image
the effect should be in the C:\BF2_ModTools\data_TES\Common\effects folder right? and what I have in my LUA is fine right, wont it just play over and over again, or will it just play once, or not at all, and need an event to play it?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Effect not showing up.

Post by Fiodis »

If the effect is finite, it will only play once.

You must load the effect somehow, rather than just calling for it in the lua. The easiest way is to attach it to an object and to place this object somewhere out-of-site on the map.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Effect not showing up.

Post by myers73 »

Ok, so my idea is to make a map that has a big emphasis on environment, so I want a lot of burning objects, and stuff like that. I read the FAQ about attaching effects to objects without hardpoints, and, well you see my result. So I place an object out of sight on the map, and via odf attach effect to a hp on it. Now how do I, via LUA get the effect to play over and over i.e. loop, at the path node I placed?
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Effect not showing up.

Post by FragMe! »

myers73 wrote:the effect should be in the C:\BF2_ModTools\data_TES\Common\effects folder right?
If you are using a shipped effect that normally found in the common folder then yes, if it is a new one you created or have pulled from a sides folder then you are probably better off making an effects folder in your world folder and placing it there.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Effect not showing up.

Post by Fiodis »

myers73 wrote:Now how do I, via LUA get the effect to play over and over i.e. loop, at the path node I placed?
I don't think you can, but you can have an infinitely repeating effect set up in PE. This works well for torches and bonfires, but not explosions.

If you want explosions on the ground without any ordance, look into Geonosis' .fx file.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Effect not showing up.

Post by myers73 »

what im looking to do now is just fire effects scattered about.
Post Reply