Weapon scripting questions

Weapon scripting questions

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
mehere101
Posts: 293
Joined: 15 Mar 2006, 02:38

Weapon scripting questions

Post 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)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Nope. Neither are really possible right now.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

What about non-turreted burst beamlasers? Shouldn't that work?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post 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!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

No, true melee would still need to disable the pushing.
Post Reply

Return to “Game Development”