So ive made multiple scripts now trying to get fx to play. Ive asked in the chat, ive messed with different functions to play fx, nothings worked. Heres my current setup to play it.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
ee1rock = GetEnt("ee1_rock", "targetname"); FXorg = spawn("script_model",self getorigin()); FXorg setmodel("tag_origin);//no need to enablelinkto but you need a tag for playfxontag FXorg LinkTo(ee1rock); round_start = get_round(5); if(round_start) { make_laughquake(); ee1clip moveZ(128,20); ee1rock moveZ(128,20); wait 10; PlayFXOnTag(level.effect["hum"], FXorg, "tag_origin" );//Edit: updated mistake
Last Edit: September 02, 2015, 02:50:30 pm by MakeCents
ee1rock = GetEnt("ee1_rock", "targetname"); FXorg = spawn("script_model",self getorigin()); FXorg setmodel("tag_origin);//no need to enablelinkto but you need a tag for playfxontag FXorg LinkTo(ee1rock); round_start = get_round(5); if(round_start) { make_laughquake(); ee1clip moveZ(128,20); ee1rock moveZ(128,20); wait 10; PlayFXOnTag(level.effect["hum"], self, FXorg );
Can you get the fx to play at all? Just like using PlayFx? Did you add it to mod.csv correctly? When you say at the top of your gsc you are using, it is in the init or main function right?
Is your if statement true at this time? Did you try adding a println inside the if to check that the if is working?
Last Edit: September 02, 2015, 02:50:55 pm by MakeCents
Can you get the fx to play at all? Just like using PlayFx? Did you add it to mod.csv correctly? When you say at the top of your gsc you are using, it is in the init or main function right?
Is your if statement true at this time? Did you try adding a println inside the if to check that the if is working?
I haven't tried PlayFX with this script, but when I did with another script it didn't work either...
The FX is being loaded from the init function. I also tried adding it to PrecacheMyFX in mapname.gsc aswell as making another function that loads before zombiemode main to load it, but none of those worked. I did have iprintlns, and it worked. The code after the fx works fine too.
This is how its added to the mod.csv, im pretty sure its right
Code Snippet
Plaintext
fx,maps/zombie/fx_meteor_ambient
Edit: tried PlayFX with both of these lines, neither worked:
Code Snippet
Plaintext
fx = playFX (level.effect["hum"],self.origin);
Code Snippet
Plaintext
fx = playFX (level.effect["hum"],ee1rock.origin);
Last Edit: September 03, 2015, 03:18:26 pm by Centric
Be in a while loop? Since I was scripting the other day and I couldnt get something similar to work and then I asked Ege115 help and he said to add while loop. Since it only checked the script once at start of game, then since it didnt check it again at the part I wanted it to happen, it didnt work
Last Edit: September 03, 2015, 06:18:57 pm by HitmanVere
Be in a while loop? Since I was scripting the other day and I couldnt get something similar to work and then I asked Ege115 help and he said to add while loop. Since it only checked the script once at start of game, then since it didnt check it again at the part I wanted it to happen, it didnt work
normally yes but since he said the rest of the script is working im going to take a guess and say the method is being called in a loop already
I tried adding the FX there, and its not commented out but still nothing. I tried adding it to my _patch.csv and mapname.csv just in case. Absolutely nothing works And the only ignore file in my mod tools is common_ignore which is empty.
Did you try and add it to mapname.csc in the preCacheMyFX function there?
I'm just throwing anything out there that is different from what I do and what you have here. I don't have any fx that go to more than one folder and I normally add my fx to both gsc and csc as well as csv.
Are you getting any errors when you build?
I assumed the fx plays in efx ed?
Last Edit: September 04, 2015, 03:36:47 pm by MakeCents