well, it seems:
"momentum1" works
"momentum0" works
"momentum(0)" doesn't work
"momentum(-0)" doesn't work
"momentum-1" doesn't work
"momentum(-1)" doesn't work
darn. I wanted that tractor beam. Will there be a future implementation of negative momentum values? (if possible? should be)
:( we need negetive momentum :P (tractor beam!)
It may possible to create a tractor beam as a usable device that causes a script to be triggered that:
1. determines a target
2. determines the direction that the object needs to move (this could be difficult->impossible). If this is impossible, make a suggestion to the "New Functions" thread, there is another mod idea that I have that would require this.
3. uses objIncVel to change the velocity of the object.
1. determines a target
2. determines the direction that the object needs to move (this could be difficult->impossible). If this is impossible, make a suggestion to the "New Functions" thread, there is another mod idea that I have that would require this.
3. uses objIncVel to change the velocity of the object.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
F50 wrote:It may possible to create a tractor beam as a usable device that causes a script to be triggered that:
1. determines a target
2. determines the direction that the object needs to move (this could be difficult->impossible). If this is impossible, make a suggestion to the "New Functions" thread, there is another mod idea that I have that would require this.
3. uses objIncVel to change the velocity of the object.

a) that sounds complex, I have little tallent scripting stuff from scratch- I specialise in novelty ideas and graphics
b) I found anohter problem- you have to deal integer damage in order for an object to be affected by the momentum
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
The only thing that is complex is (2). All others can be written in one line of code.
I'll see if I can write this Saturday.
EDIT: It appears that the only way to do (2) is to find the distance between two objects and create vectors of that distance from 1 to 360 and use enum to find the vector that ends up closest to the position of gPlayership. This is quite annoyting though, and yes it is complex.
I'll see if I can write this Saturday.
EDIT: It appears that the only way to do (2) is to find the distance between two objects and create vectors of that distance from 1 to 360 and use enum to find the vector that ends up closest to the position of gPlayership. This is quite annoyting though, and yes it is complex.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
not that i'd know how to do any of that
anyway, I don't want the script to work under "invoke" I wanted it to fire like a normal cannon.

anyway, I don't want the script to work under "invoke" I wanted it to fire like a normal cannon.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
If there is some kind of <OnHit> event (perhaps <OnDestroy> would work?), then you can fire it like a normal cannon.
Otherwise, you can simulate it being an autoturret by also creating weapon's fire. It will seem like a regular omni to the player.
If you want a straight-firing tractor beam, then (2) is not necessary.
Also, the movement will occur *before* you create the weapons fire, so you'll either have to make a cool effect (one dummy weapon going from their ship to yours and, if you wish to cause damage, one weapons fire going from right beside their ship into their ship) or have a short range on the tractor beam.
As I said, its not much code (with the invoke), so I should be able to write it for you Saturday.
Otherwise, you can simulate it being an autoturret by also creating weapon's fire. It will seem like a regular omni to the player.
If you want a straight-firing tractor beam, then (2) is not necessary.
Also, the movement will occur *before* you create the weapons fire, so you'll either have to make a cool effect (one dummy weapon going from their ship to yours and, if you wish to cause damage, one weapons fire going from right beside their ship into their ship) or have a short range on the tractor beam.
As I said, its not much code (with the invoke), so I should be able to write it for you Saturday.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
well, the tractor beam's effect is virutally instant, thus it does not matter too much. it is omni though.F50 wrote:If there is some kind of <OnHit> event (perhaps <OnDestroy> would work?), then you can fire it like a normal cannon.
Otherwise, you can simulate it being an autoturret by also creating weapon's fire. It will seem like a regular omni to the player.
If you want a straight-firing tractor beam, then (2) is not necessary.
Also, the movement will occur *before* you create the weapons fire, so you'll either have to make a cool effect (one dummy weapon going from their ship to yours and, if you wish to cause damage, one weapons fire going from right beside their ship into their ship) or have a short range on the tractor beam.
As I said, its not much code (with the invoke), so I should be able to write it for you Saturday.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
http://xelerus.de/index.php?s=mod&id=115
Currently you have to invoke it every time you want to move a ship, but that should be relatively easy to solve with some research.
Currently you have to invoke it every time you want to move a ship, but that should be relatively easy to solve with some research.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
hmm... i don't think it would be too hard for george to re-implement the variable type, or change his parser slightlyF50 wrote:http://xelerus.de/index.php?s=mod&id=115
Currently you have to invoke it every time you want to move a ship, but that should be relatively easy to solve with some research.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
The mod fully works with a recurring timer...on the playership. I'll see about getting an AI corsair to use it Sunday. Technically, the Corsair won't *use* it, it'll be built into the ship's internal structure, but close enough. This may lag the game though. I might also use Periculi's mod to avoid redefining the playerships, but that's not guaranteed. If I'm feeling bored I might also change the linear search into a binary search.
Once the prototype is built, I don't think you'll have much trouble incorporating it into your own mod.
Once the prototype is built, I don't think you'll have much trouble incorporating it into your own mod.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
mm yeah good point... that EMP would also nicely allow you to remove the annoying side affect of doing armor damage...12Ghost12 wrote:The tractor beam would be more effective on non-docked ships if it EMP'ed the target - at the moment it doesn't do much to them because they are already moving.
I wanted to place this on a ship which would drag other ships in close to it and them maul them to bits with small close range guns.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>