Jump to content
Sign in to follow this  
sanctuary

A fire object

Recommended Posts

Hello

I need some help about the .cpp file defining an object that is not visible , but used to create a fire.

Something like what is used on the majority of the burning effects mods.

Looking at several config using those burning effects, and how they produce burning vehicle , how their scripts are using new invisible objects, i created something similar just to see if i can understand how it works.

It works very well ingame, producing fire and burning effect when desired , i am using the DKMM burning script for it (it uses an "nameobject inflame true" to trigger it)

But when i approach the fire i have the action "Put out fire" that appears like when you are near the BIS fire, and there is my problem : i don't want this action to appear.

Is it possible to have such object triggered to activate a fire like in any effect mod, but without leaving the possibility to any player or other unit to be able to stop that fire ?

(all the effect mods i looked at have the same problem actually, some using more than one invisible "fire" object even have several "Put Out fire" actions appearing).

In other term, how to configure such object in its config.cpp to disable the "Put out fire" action that will appear as soon as someone will approach near to it , but without losing the "nameofobject" inflame true possibility ?

After a long time, i am now totally clueless there.

Thanks for any help.

Share this post


Link to post
Share on other sites

problem solved by using philcommando tutorial about the good string for the removeaction.

EDIT : i was wrong, the problem is not solved , the "put out fire" action always occur when i approach the fire.

Argh.....

Share this post


Link to post
Share on other sites

As far as i know you could replace the number by the text of the command like in command editor :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_unit RemoveAction Attack

Share this post


Link to post
Share on other sites
Quote[/b] ]As far as i know you could replace the number by the text of the command like in command editor

You can only use RemoveAction, with the Action ID's returned by the script command, AddAction.

Quote[/b] ]In other term, how to configure such object in its config.cpp to disable the "Put out fire" action that will appear as soon as someone will approach near to it , but without losing the "nameofobject" inflame true possibility ?

If your only using the fire class for the InFlame command. Why not just move the object out of the way, once the fire script has been started?

Share this post


Link to post
Share on other sites

Well as i found no solution, i moved to use a simple drop script to simulate the fire (so without any "fire object").

But i have not thought about moving away the fire object after the fire start, thank for this suggestion for the next time i will try to use something like this for a script

Share this post


Link to post
Share on other sites

_this removeaction 0

_this removeaction 1

on the fire

should remove the 2 actions on a fireplace

on off

havent tried it .. but should work.

Share this post


Link to post
Share on other sites
Quote[/b] ]should remove the 2 actions on a fireplace

on off

havent tried it .. but should work.

No it does not work, and I did test it. At least on Res V1.91 using Empty\Objects\Fire in the editor. I cant say I've tested every possible connotation, but I did try and test it from within a config to. But I assumed it was common knowledge that you cant use RemoveAction for every action in OFP?

For anyone who is interested there are two kinds of actions:

Those you add using AddAction in a script or mission, they can be removed with RemoveAction, have a default activation radius of about 50 meters, and are available to everyone within that radius.

The others are User Actions, those you add via a config, they have a user defined radius that goes up to the maximum view distance you set in OFP's config. Have a condition field to decide who gets to display the action and a statement field to say what’s to be done when selected:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class FOStartStandScan

{  

       displayName=$STR_DN_FOStartStand;

       position="zbran";

       radius=0.5;

       condition="(([This] Call FO_ObserverReady) and (CanStand This) and (Alive This))";

       statement="[This,True,FO_STAND] Call FO_SetActiveStatus";

      };

@Sanctuary

Just out of curiosity what did you intend to use the InFlame command for, Mission editors or internally in your scripts?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×