ShpFireWeapon

Freeform discussion about anything related to modding Transcendence.
Post Reply
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

The problem is that I have a weapon that has a very high repeat value, and SysCreateWeaponFire isn't enough to simulate it (I'm thinking that running an enum or for loop would drain resources too fast D: ). I'm thinking about submitting a ticket like this:

I'd like to have a way to have a ship fire secondary weapons without having to fake it with SysCreateWeaponFire. (this is so that I can get AI ships to use my particle field correctly)
Suggested syntax:
(ShpFireWeapon spaceobject weaponID posVector dir speed objTarget)

I think that there might be a workaround that I didn't think of before.
Suggestions?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

You can't do repeat rate with an enum of for loop because the code dosen't run asyncronously. All shots from one loop will fire on the same game frame anyway. You'd have to make a temporary timer event that created a new shot every frame or something.

You might be able to make a alternate version of the weapon type that, instead of having a fast refire delay, fires a rapid volley seqeunce that takes 15-30 frames to shoot with a refire of that many frames, so the AI dosen't have to 'hold the button down' ?
Image
Image
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

How can I simulate a 'rapid volley sequence'? Repeat isn't really very friendly...
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

multiple SysCreateWeaponFire with different speeds will create a nice volley effect.
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

digdug wrote:multiple SysCreateWeaponFire with different speeds will create a nice volley effect.
That is useful when you want to make a shotgun blast that is not a particle cloud in a single tick.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

There's no way to simulate a particles-type weapon using SysCreateWeaponFire, because there is no shotObject to add the firing spaceObject's velocity to.

But I'd recommend using adjusting the 'repeating=' property to simulating sequential burst behavior, while adding multiple entries in the configuration tag to simulate volley behavior. Also consider increasing the AI's aimTolerance.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

TVR wrote:There's no way to simulate a particles-type weapon using SysCreateWeaponFire, because there is no shotObject to add the firing spaceObject's velocity to.
This is false. There is a single shot object for particle weapons. Syscreateweaponfire returns it and you can adjust its velocity just like any other shot object and it will look fine.
Literally is the new Figuratively
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

Atarlost wrote:This is false. There is a single shot object for particle weapons. Syscreateweaponfire returns it and you can adjust its velocity just like any other shot object and it will look fine.
Actually, I tried this, but it does not work. TVR is right. Ticket #1057 was written because of that.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

I have made use of syscreateweaponfire and objincvel with particles type weapons. If it doesn't work it's something George broke since 1.07.
Literally is the new Figuratively
Post Reply