Torch Weapon (Almost Works)

Users who are viewing this thread

N0ught

Sergeant Knight at Arms
Alright I have searched the forums for implementing flaming items ad nauseum, and I have come up with this:

Code:
["flaming_armor", "Armor on Flame", [("light_mail_and_plate",0)], itp_merchandise| itp_type_body_armor  |itp_covers_legs ,0,
 3454 , weight(22)|abundance(100)|head_armor(0)|body_armor(50)|leg_armor(25)|difficulty(5) ,imodbits_armor,
    [(ti_on_init_item,
        [(try_for_agents, ":agent"),
            (get_player_agent_no, ":agent"),
            (agent_get_position, pos1, ":agent"),
            (try_begin),
               (set_position_delta, pos1, 0, 170, 0), #Position, X, Y, Z.
               (particle_system_add_new, "psys_torch_fire", pos1),
            (try_end),
         (try_end)])]],

... It works great - it makes your head flame while wearing it, and I'm pretty sure I could adapt it to weapons too. The problem is, once I have used it in a scene, further access to inventory crashes the game - I think the problem is it tries to display the particles in the menu screen and cannot.

Does ANYBODY know how to fix this? Weeks of plumbing the forums with my limited internet time haven't helped solve the problem. :evil:

And besides, if we can pin this down it will be simple for other people to implement it in the future. Any help is appreciated! :mrgreen:
 
Don't use Agents. Use troops. If I remember right, then ti_on_init_item saves trigger paramater no2 as troop.
 
Using (store_trigger_param_1, ":destination"), will give you the Agent of the user who is wearing that armor into :destination variable. (store_trigger_param_2, ":destination"), will give you the Troop of the user who is wearing that armor into :destination variable.

Might be vice-versa tho, I don't remember.  :razz:
 
N0ught said:
Alright I have searched the forums for implementing flaming items ad nauseum, and I have come up with this:
...
... It works great - it makes your head flame while wearing it, and I'm pretty sure I could adapt it to weapons too. The problem is, once I have used it in a scene, further access to inventory crashes the game - I think the problem is it tries to display the particles in the menu screen and cannot.
You probably need to assign a different menu mesh to appear in shops. Although I'm not sure. You can also put a condition inside that trigger to check if you are in a shop menu, and bypass particles

Making flaming armor is easy, you just need to track agent position, as armor position does not change relative position much. Unless you are killed or mounted or go through any other animation that displaces your body from your map position :smile: I bet you will have some nice displacement of flames in this case. Those things can also be scripted with enough patience.
But don't hold your breath for flaming weapons - tracking weapon position is nigh impossible.

If you need flaming weapons, you better look into shaders programming. The answer is there, I feel it :smile:
 
cdvader said:
Using (store_trigger_param_1, ":destination"), will give you the Agent of the user who is wearing that armor into :destination variable. (store_trigger_param_2, ":destination"), will give you the Troop of the user who is wearing that armor into :destination variable.

Might be vice-versa tho, I don't remember.  :razz:

Where can we get documentations about params of triggers?
 
There isn't any. I probably should, indeed, create a documentation on those.
 
It would be great if you could make torch weapon, which light the surroundings.
 
GetAssista said:
N0ught said:
once I have used it in a scene, further access to inventory crashes the game
You probably need to assign a different menu mesh to appear in shops. Although I'm not sure. You can also put a condition inside that trigger to check if you are in a shop menu, and bypass particles
@N0ught
it will absolutely crash the game, no doubt.
GetAssista's advice is fully doable.

@cdvader
yes please, make such a documentation!

@Kolba
MnB engine seems have no dynamic lighting.
 
@Kolba
MnB engine seems have no dynamic lighting.

But is this possible to move together scene props: torch and light (in edit mode it's a bulb), when the agent changes his position? Or merge the light with torch?
 
By the way, is this possible to make a water arrow dousing torches? It would be the best to clear the fire particle system, when the arrow collides with torch. I'm not sure is this possible to make such thing, but as I know it is possible to clear particle systems on the map (for example stopping villages to smoke after being looted).
 
Track position of the arrow, like in fire arrows mods, check if coords are near torch, hide flames prop if near enough.
But you can't extinguish light source, so the lit area will still be there
 
Back
Top Bottom