:( we need negetive momentum :P (tractor beam!)

Post ideas & suggestions you have pertaining to the game here.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

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)
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

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.
User avatar
Arisaya
Fleet Admiral
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.
:shock:
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!>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

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.
User avatar
Arisaya
Fleet Admiral
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 :lol:

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!>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

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.
User avatar
Arisaya
Fleet Admiral
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: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.
well, the tractor beam's effect is virutally instant, thus it does not matter too much. it is omni though.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

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.
User avatar
Arisaya
Fleet Admiral
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: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.
hmm... i don't think it would be too hard for george to re-implement the variable type, or change his parser slightly
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

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.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

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.
mm yeah good point... that EMP would also nicely allow you to remove the annoying side affect of doing armor damage...

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!>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Remember that this uses only a script. There is no armor damage. In fact, there isn't even a weapon being used.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

the main thing is to make the tractor device only work at a certain range, that way you won't be able to pull a hostile ship without it's station seeing you.
Post Reply