Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Starman01 on June 06, 2004, 04:32:59 am

Title: Fred-Question for invisible ships
Post by: Starman01 on June 06, 2004, 04:32:59 am
If have two minor minor Fred-Problems here (not technical, I just
don't know how to do it).

What must be done, when I want a ship become completly invisible
when I reached a specific distance ?

The Ship "Invisible" -thing is just invisble on the radar, and
Ship "Stealthy"-seems to have no effect either. Problem is, I need
that ship, so I cannot let it warp out or be vanished.

(I'm cruising around using the autopilot. When I more than 30.000
meters away I want it to be not visible (and targetable) anymore,
on the contrary I want it to be visible and targetable again, when
I'm getting closer again)

Another thing, that really going on my nerves is this :

I have a nav buoy in the ships.tbl with the flag "nav bouy". When
it is more than 5000 meters away, I can target it, but there are
no target-brackets around it. On other ships the distance
doesn't seem to matter, I have always these brackets around them.

I have to go closer than 5000 meters to the buoy to get those
brackets. I really don't know why, the flag in the ships.tbl doesn't
seem to be responsible for this. Has onyone a Idea (the pof-model
is rather small btw) how this can be solved ?

Thanks.
Title: Fred-Question for invisible ships
Post by: karajorma on June 06, 2004, 06:51:17 am
No idea on the bouy question but for the ship I have 2 possible ideas.

1. Make an identical model to the original ship but texture it with the invisible texture (simply change the name of all the textures to invisible in PCS). Then use the change-model SEXP (or whatever it's called) to swap models to the invisible one.
 Doing things this way will allow the ships to continue shooting etc. I'm not certain if the new model would take up a slot in your ships.tbl though since I haven't played about with Change-model at all.

2. Using the get-x, get-y etc SEXP's get the current location of the ship and store it in 3 variables. Then using the set-ship-position SEXP move the ship 100,000m away and make it stealthy.

When the player is back in range you can use the set-ship-position SEXP to move the ship back into the position stored in the variables.

(If your ship is standing still you don't even need the variables or getX SEXPs as you already know the co-ordinates).

Hope that helps :)
Title: Fred-Question for invisible ships
Post by: Starman01 on June 06, 2004, 11:19:17 am
Kinda complicated. Screw this "stealthy"-flag, i now made it by setting
them "invisible" and change their model files to nav buoy, when they
are more than 30.000 meters away, because they are really tiny.

Now all I need is that max_radar_range-flag for the launcher
again, otherwise I will have always these flashing blibs on the radar.

There is also a max_radar-range sexpression, but I didn't get it to
work. It says, that it is only affecting ships who have given the
"primitives-sensors"-flag (in ships.tbl I guess), but that didn't worked
either.

Maybe it isn't supposed to work with the player-ship ?

Nevertheless, I finished my first autopilot-mission with 4 navpoints,
and it plays out really cool :)

P.S. Is there a limit to events or op-operators in FRED ?  Looks like
I reached it, I didn't thought this is possible. I haven't got the error-
messages around anymore (said something about a "full op-tree"), I
upgraded the scripts to lower their amount a little and by reducing
them the error was gone, but there are still 105 events and over
150 op-operators included.
Title: Fred-Question for invisible ships
Post by: karajorma on June 06, 2004, 02:06:07 pm
Sounds like you hit the limit. There is one but it's pretty high up :D

The way I understand it set-ship-stealthy does the same as giving the ship a stealth tag in the tables. IIRC this would remove the flashing blip.
Title: Fred-Question for invisible ships
Post by: Starman01 on June 06, 2004, 04:03:14 pm
Quote
Originally posted by karajorma
The way I understand it set-ship-stealthy does the same as giving the ship a stealth tag in the tables. IIRC this would remove the flashing blip.


Unfortunaltey not. That's why we need this radar-range flag. What s
the radar-reduce-flag already in the launcher ? Has it something to do
with it ?  I can add no value though.