News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Secondary weapon firing on RMB - how?

Started by motorsep, May 11, 2015, 12:03:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BielBdeLuna

we did the same when we added other new smokes for weapons back in d3w days, just add a new entity in a selected bone, and attach it to the bone so it follows it. the entity that you add can have it's own scriptobject that will intitate as soon as it get's spawned
this means it will run it's own loop so you can have it's ownh state working there

and a way to acces this scriptobject it should be the same way the net_reload does

with it's own loop you could have the weapon need a long delay before it can fire independant form the other weapon, or you could have another check before you can fire it. i don't know you would be free to implement some complicated behaviour for it. you could treat the inputs form the player as seters of the input variables, even you constantly set the veraibles in the secundary weapons following the button pressing of the player in the player loop again calling "setter" functions like the net_reload way

from the weapon, you could setup an inverse system referncing the actual player that spawned it in order to gather info on the ammo

this all should be doable without any c++ changes