Page 1 of 2

Attack/Combat Modes

Posted: Wed Jul 18, 2012 7:42 pm
by mandoman
I have a ship with which I would like it to perform rather strangely. It's called Gyro, because it IS a gyro.....with lasers. I would like it to spin at a high rate of speed, firing all four weapons at the same time, and changing directions on a penny. I want it to be the enemy of everyone, and I mean everyone, including Thargoids, and Cylons, and whatever those Swarm bugs are. It will have a very low tolerance to attack, but it's speed, and quickness will make it hard to hit. It's accuracy will be low, when firing lasers, as it will just fire lasers at everything that moves (and some that don't). The lasers will be of the Pulse variety, but I want them to be able to fire continuously. In other words, this is a really strange alien ship that hates everyone, and will even inadvertently fire on it's own kind in it's frenzy. At this time, most of what I just listed is not possible, from what I understand from Fatleaf. Is there a possibility of making any of this type of behavior functional, like in an AI, or script? I've had another ship once before that I wanted to be able to do similar to this one, just not as crazy, and never did get it to function the way I wanted. Just asking. :)

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 4:52 am
by Wildeblood
An NPC ship that spins around as it flies is easy. I'll PM you an example. Making it shoot at things I don't know anything about.

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 11:50 am
by Shipbuilder
@Wildblood - I would also be interested in seeing the example enabling a ship to rotate while it is flying as I have a couple of ideas for future oxps.

Is this based on the rotational_velocity entry for sub-entities noted in the shipdata.plist document on the Wiki or is it a rotation of the main vessel ?

What sort of rotation can you achieve i.e. can you rotate a model around any axis or is the rotation limited to a single axis ?

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 1:06 pm
by mandoman
Wildeblood wrote:
An NPC ship that spins around as it flies is easy. I'll PM you an example. Making it shoot at things I don't know anything about.
I was wondering about that "rotational velocity" entry in shipdata.plist. Thanks. I'll have to study that script, too. :)

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 2:14 pm
by Fatleaf
mandoman wrote:
Wildeblood wrote:
An NPC ship that spins around as it flies is easy. I'll PM you an example. Making it shoot at things I don't know anything about.
I was wondering about that "rotational velocity" entry in shipdata.plist. Thanks. I'll have to study that script, too. :)
A good example of a subentity on a ship using that is the Caduceus engines. Look at the external view from behind and you will see them spin round the port one counter-clockwise the starboard clockwise (Or is that the other way round?!?!). They work quite well.

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 2:49 pm
by Wildeblood
mandoman wrote:
I was wondering about that "rotational velocity" entry in shipdata.plist. Thanks. I'll have to study that script, too. :)
Yes, rotational velocity works on the main entity too. Mandoman, ignore that script - it's an old-style script, not javascript.

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 3:29 pm
by Thargoid
Are you sure, because it certainly didn't used to in the past and the wiki only refers to using it with sub-ents. If that has been changed then it's new and docs need to be updated.

You can certainly spin a ship by script, but it usually just causes all sorts of weird flight paths as the ship always flies in the direction it's facing (unless you start playing with its velocity too).

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 3:37 pm
by Fatleaf
Why not then just make a subentity of the ship spin but not the ship itself. And then make the main ship bit that the subent is attached to smaller and appear insignificant so the ship will have a stable flight path.

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 3:53 pm
by mandoman
I'm not sure I'm interested in a stable flight path. These guys are loonies to any other species mind, including Thargoids (as hard as that is to believe). I kind of want it to go nuts. It should jump into any system, at random, and start spinning at high velocity, firing all weapons at anything, and everything. Chaotic? Yes, but that is the point. Gyros are chaotic unless strictly under control, and the beings flying these things are anything but under control. I haven't yet decided what they are, but I'm thinking on it. I want this ship to dart about, spinning at a blinding rate, firing all weapons at everything in site, and either getting blown out of space by some hot shot pilot, or smashing into an asteroid, ship, station, or Rock Hermit. I don't know if this will work, but it kind of takes the craziness of Thargoids up a notch. :D

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 5:00 pm
by Wildeblood
Thargoid wrote:
Are you sure, because it certainly didn't used to in the past and the wiki only refers to using it with sub-ents. If that has been changed then it's new and docs need to be updated.

You can certainly spin a ship by script, but it usually just causes all sorts of weird flight paths as the ship always flies in the direction it's facing (unless you start playing with its velocity too).
Let me clarify: it's not mine, so don't ask me for explanations, I just said I had an example of the sort of thing Mandoman was describing. It doesn't rotate smoothly about the z-axis as Shipbuilder wants, it whirls about chaotically, as Thargoid says. It's not done with sub-entities, it's not done by script, but by setting rotational velocity. Whether rotational velocity applies to a ship seems to depend on the AI in use: when this thing comes under the spell of docking.AI it stops whirling about. If you know which ship model I'm referring to, please don't mention it by name here.

Re: Attack/Combat Modes

Posted: Thu Jul 19, 2012 9:13 pm
by Thargoid
Fair enough, and thanks for the clarification.

It sounds like the AI command performTumble is involved, although that sets speed to zero. But possibly in combination with a script-set velocity it could give a moving and tumbling ship, but not one that can laser attack (as that needs performAttack).

Re: Attack/Combat Modes

Posted: Fri Jul 20, 2012 10:41 am
by Commander McLane
I guess that the desired attack behaviour as outlined in the first post can't be achieved by normal AI behaviour anyway, but has to be somehow emulated through clever scripting.

Re: Attack/Combat Modes

Posted: Fri Jul 20, 2012 1:28 pm
by mandoman
Commander McLane wrote:
I guess that the desired attack behaviour as outlined in the first post can't be achieved by normal AI behaviour anyway, but has to be somehow emulated through clever scripting.
LOL!!! Okay, that counts me out. :lol:

Re: Attack/Combat Modes

Posted: Fri Jul 20, 2012 10:00 pm
by Tricky
How about ship.orientation ? Like YAH billboard uses in it's script.

EDIT: Of course in this case you would use a frame callback to change the orientation a small random amount rather than following a towing ship.

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 7:23 am
by Thargoid
That's the spinning by script method I mentioned above, in more specific detail ;)