Author Topic: mines  (Read 3201 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I should note that there is a createWeapon flag in scripting...and I think I just fixed the script-eval SEXP. So all you need to do is define a function, and then do

op script-eval
-- "minefield(24,32,8, 5,20,6)"

Which uses createWeapon to randomly spawn weapons within the box defined by those two sets of 3 coordinates.

(Remember, SEXP strings can only be 32 characters in length.)

The problem with random creation via script or SEXP is that you stand a chance of spawning one mine directly on top of another one or inside any other objects you've placed in the target zone. You don't have the game engine working to move anything that is spawned outside the bounding box of anything else already in existence in the same was as you do with the asteroid field code. Now maybe you can make a script that can push and pull mines until they are out of the bounding box but AFAIK you can't with SEXPs or I'd have already made minefields that way already. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
like I said, the mine flag has nothing to do with proximity detonation, it's mostly for dealing with what other objects cause it to blow up, for instance, mines on the same team, shouldn't set each other off.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

  

Offline Trivial Psychic

  • 212
  • Snoop Junkie
They way I see it:

Mine Type 1 - similar to Countermeasure, classed as weapon
Mine Type 2 - technically a ship, can be single-placed in FRED, as with asteroids
                  - requires new ship class to recognize various behaviors, some of which JGZinv mentioned (but others would be sexp scripted)
                  - behaviors would be a combination of data in objecttypes.tbl and options in the ships.tbl to dictate these behaviors to specific classes of mine
Minefield - Uses something possibly similar to asteroid field code (possibly incorporated into asteroids.tbl) and FRED interface
              - multiple properties and types per field can be created, but draws its data on the mines themselves from those in the ships.tbl
              - additional player command "self destruct" to trigger single mine or mine wing detonation.
The Trivial Psychic Strikes Again!