Page 1 of 1
Weapon scripting questions
Posted: 23 Sep 2006, 05:01
by mehere101
Is it somehow possible to imitate a 'slasher' style beam in spring? (I'm refering to a class of Freespace 2 beam weapons that slash the target instead of focusing on one spot).
Also, it it possible submunitions? (I'm not really to hopeful on this)
Posted: 23 Sep 2006, 05:30
by Argh
Nope. Neither are really possible right now.
Posted: 23 Sep 2006, 09:56
by rattle
What about non-turreted burst beamlasers? Shouldn't that work?
Posted: 23 Sep 2006, 10:19
by KDR_11k
yeha just added functionality for firing any weapon therough the script so now it is possible. But you have to fire the beamlaser once per frame since the beam cannot be reoriented between firings.
Posted: 23 Sep 2006, 17:01
by zwzsg
I read up that submunitions were possible in TA. The idea was to have a weapon where the spreading only occurs a while after the shot has been shot, and to fire a large burst of shots all at once, so initially all shots occupy the same position so looks like one, then they spread. I can't find back the topic, don't remember exactly how you make them spread after a while (I think it's something about how missile go into loose mode when out of flight time), and anyway Spring difference in weapon TDF tags interpretation could make it not work directly. But it's still a lead to investigate.
KDR_11k wrote:yeha just added functionality for firing any weapon therough the script
Woah, very good!
Posted: 23 Sep 2006, 17:07
by KDR_11k
I think you could fire a fake shot that is really part of the unit, then fire the weapon from that. With the forced firing we can make that work without the risk that the unit might have stopped aiming when the "shot" detonates.
Posted: 24 Sep 2006, 13:18
by rattle
emit-sfx <WeaponNum-1>+2048 from <piece>; does the trick in the latest build.
WeaponNum is the number of the weapon on the unit (not a weapon ID), starting with 0.
emit-sfx 0+2048 from <vector>; would detonate the primary weapon at given vector; vector meaning something with less than two vertices in this case, e.g. a flare1 position. To make it "shoot" from something you have to emit it from a piece with more than two vertices. Thus "emit-sfx 1+2048 from gun1" would fire weapon 2 from an object called gun1.
zwzsg: Your fat shrew stomp script may greatly benefit from that, you don't need hacky workarounds anymore :). True melee combat looks quite possible now...
Posted: 24 Sep 2006, 14:04
by KDR_11k
No, true melee would still need to disable the pushing.