Emergency Flare - 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 Resources (https://www.frictionalgames.com/forum/forum-42.html) +---- Thread: Emergency Flare (/thread-16229.html) Pages:
1
2
|
Emergency Flare - SilentStriker - 06-17-2012 Hello everyone So this is a little thing I have wanted to do for a while and now I finally got it everything I need and got it working so I want to share it with the forum. So this is an Emergency flare that spawns on a script area that will light up areas for you but will burn out after a certain amount of time which makes it an alternate portable light source that has some dynamics in it Picture of it in action This package comes with a Flare model, Flare sound and some burning flare particles. And if you want to use it you need to place each folder in it's certain category. Flare goes in to Entities, Flare_sound to sound folder and flare_particles goes into the particle folder (remember to add these components to your CS folder if you are going to use it Here's the code to make it work Put this code inside void OnStart() Code: SpawnFlareAtArea("EmergencyFlare", "SpawnFlare", 0.79f); So I'm going to break down this code so you can change it yourself. EmergencyFlare: is the name of the Flare (it's not that relevant so just keep it.) SpawnFlare: is the name of the Script Area you want to spawn the flare. 0.79f: is the Burn Time for the Flare, you can change it to what ever you want (Remember that the higher the number is the longer it will burn and right now it burns for around 1 minute) Here's the rest of the code that you just have to copy and paste in to your .hps Code: ////////////////////////// If you have any questions feel free to ask them and I will be glad to answer CREDIT Traggey for making me the Flare model (since my own sucked x)) DarkAdders for making the particles system for the flare (also since my own sucked) Palistov for the source and gave me the inspiration and knowledge to do this Frictional Games for making the Flare sound (it's from penumbra) DOWNLOAD V1.1 Updated it by changing side of the flare so it don't collide with the lantern RE: Emergency Flare - MaZiCUT - 06-17-2012 Do you have to have a total conversion? RE: Emergency Flare - SilentStriker - 06-17-2012 Nope, since it's not a lantern it works on any CS and any FC It's just an entity I played around with so when you grab it you will hold it like a lantern then you can throw it away and have a flare lighting up an area without you holding it ^^ That's why I said it's an alternative light source RE: Emergency Flare - MaZiCUT - 06-17-2012 (06-17-2012, 11:26 AM)SilentStriker Wrote: Nope, since it's not a lantern it works on any CS and any FC It's just an entity I played around with so when you grab it you will hold it like a lantern then you can throw it away and have a flare lighting up an area without you holding it ^^Oh good, so it's an entity that just lights up when you touch it good thing i can use it in a custom story but that's the flaw, is there no way to light it up when you want to instead? looks sweet though RE: Emergency Flare - SilentStriker - 06-17-2012 (06-17-2012, 11:27 AM)CrazyArts Wrote:Well since it's a flare you are supposed to touch it and light it but if you change the SetEntityPlayerInteractCallback(flareName, "InteractFlare", true);(06-17-2012, 11:26 AM)SilentStriker Wrote: Nope, since it's not a lantern it works on any CS and any FC It's just an entity I played around with so when you grab it you will hold it like a lantern then you can throw it away and have a flare lighting up an area without you holding it ^^Oh good, so it's an entity that just lights up when you touch it to maybe AddEntityCollideCallback or something and then change the syntax on InteractFlare then you can have it light up when you want instead of touching it. But it's supposed to light up when YOU touch it since flares don't start burning by themselves (But if you want to have like a flare laying in a corner already burned then you can make it start burning from the beginning pretty much but remember that it burns out after a certain amount of time RE: Emergency Flare - MaZiCUT - 06-17-2012 (06-17-2012, 11:31 AM)SilentStriker Wrote:No i don't think a flare just lights up when you touch it, i meant what if i want to carry it around for a little while until i light it up, or maybe there can be different places with proper material to light them up? Like i have a flare that's not lit, then i find this gas leak and theres an area around that gas leak called LightFlare and when the flare comes in contact with it , it lights up(06-17-2012, 11:27 AM)CrazyArts Wrote:Well since it's a flare you are supposed to touch it and light it but if you change the SetEntityPlayerInteractCallback(flareName, "InteractFlare", true);(06-17-2012, 11:26 AM)SilentStriker Wrote: Nope, since it's not a lantern it works on any CS and any FC It's just an entity I played around with so when you grab it you will hold it like a lantern then you can throw it away and have a flare lighting up an area without you holding it ^^Oh good, so it's an entity that just lights up when you touch it RE: Emergency Flare - SilentStriker - 06-17-2012 Well then you change the SetEntityPlayerInteract to AddEntityCollideCallback but the problem then you need to change a bit in the code, for example every part of the code were it says entity pretty much x) RE: Emergency Flare - palistov - 06-18-2012 (06-17-2012, 12:08 PM)SilentStriker Wrote:Fix that. You've got an artifact from my source in there RE: Emergency Flare - SilentStriker - 06-18-2012 Oops I thought I had removed that ^^ RE: Emergency Flare - kartanonperuna - 07-16-2012 Nice. |