[SCRIPT] Particels won't work! - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Particels won't work! (/thread-13124.html) Pages:
1
2
|
Particels won't work! - trollox - 02-05-2012 Okay so here's my script : void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "Door", true, 1); AddEntityCollideCallback("Player", "ScriptArea_1", "Script", true, 1); AddEntityCollideCallback("Player", "ScriptArea_2", "Door2", true, 1); AddEntityCollideCallback("Player", "ScriptArea_3", "Door1", true, 1); AddEntityCollideCallback("Player", "FlyingJesus_1", "Scare", true, 1); AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1); AddEntityCollideCallback("Player", "PortalArea_1", "Portal", true, 1); } void Door(string &in asParent, string &in asChild, int alState) { SetEntityActive("Door_1", true); SetEntityActive("ScriptArea_2", true); SetEntityActive("ScriptArea_3", true); } void Door1(string &in asParent, string &in asChild, int alState) { SetEntityActive("Door_1", false); } void Scare(string &in asParent, string &in asChild, int alState) { SetEntityActive("Jesus_1", true); AddPropForce("Jesus_1", 0, 0, 0, "World"); PlaySoundAtEntity("", "24_iron_maiden.snt", "FlyingJesus_1", 0, true); } void Door2(string &in asParent, string &in asChild, int alState) { SetEntityActive("Door_2", true); } void Script(string &in asParent, string &in asChild, int alState) { SetEntityActive("ScriptArea_2", true); } void Portal(string &in asParent, string &in asChild, int alState) { CreateParticleSystemAtEntity("Portal_1", "Portal_1.ps", "PortalAltar_1", false); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } But for some reason the Particle that (the demon alike one). Dosen't activate when i hit the area it activates just as i enter the map , andi don't want that. Maybe this script is incorrect , if so please help me :/. Trollox. RE: Particels won't work! - Khyrpa - 02-05-2012 You have to create the particle effects into entites (script areas work too). If you place particle effect in level editor that doesnt loop, it will run at start and then disappear. RE: Particels won't work! - trollox - 02-05-2012 What that made no sense could you be a little more detailed khyrpa? I'm very new to scripting etc , would be awesome if you could make it easier to understand. RE: Particels won't work! - Ninami - 02-05-2012 The only thing I can think of is if you accidentally have the "PortalArea_1" close to your "PlayerStart" area. Because I think the script looks fine. I assume you don't have a particle on your level editor since you are creating one in your script? RE: Particels won't work! - trollox - 02-05-2012 Well.. I do have a particle in the level editor. And the particel is located at the end of the map. So pretty much as far from the start area as possible.. So that won't work :/ RE: Particels won't work! - Ninami - 02-05-2012 That's your problem, you're not suppose to add the particle on the Level Editor. Because this script line: Code: CreateParticleSystemAtEntity("Portal_1", "Portal_1.ps", "PortalAltar_1", false); Creates a particle on its own. Just delete the particle in level editor and it should work. RE: Particels won't work! - trollox - 02-05-2012 That makes no sense how can it creat a particle on it's own with out having it in the game when i named it Portal_1? And like i though it didn't. Maybe i need to change the Portal_1 to the original particle name? Or any other suggestions? RE: Particels won't work! - Ninami - 02-05-2012 It makes perfect sense The script says "CREATEparticlesystematentity" not "ACTIVATEparticleonsystematentity" so it creates a particle. If you simply add a particle on level editor it starts right away, like your problem. on "Portal_1.ps" it should be the EXACT name of the particle in the folders "particle". For example, if I want bubble particles, I write: CreateParticleSystemAtEntity("Portal_1", "ps_acid_container_bubbles.ps", "PortalAltar_1", false); If the name of the particle isn't exactly what you write, it wont work. So just find the particle, copy/paste the name and use it in your script. RE: Particels won't work! - Your Computer - 02-05-2012 FYI: Placing particle systems in the level editor is not counter-productive. Particle systems die because they were not meant to respawn, not because they existed outside of scripts. Look at the rain and fog particle systems, for example. RE: Particels won't work! - Ninami - 02-05-2012 Yeah as I said, "If you simply add a particle on level editor it starts right away" like rain and fog. If you want particles to spawn at certain times, you create particles with script (at least that's what I learned). So there were 2 "problems" here, first he shouldn't have added a particle in level editor, and he named the .ps file wrong. Am I right, "Your Computer"? |