Home   Help Search Login Register  

Author Topic: AP_minefield  (Read 2052 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
AP_minefield
« on: 20 Aug 2004, 16:13:23 »
This script needs a minepack addon, There are two I know about :
COC mines
and the more recent
SFM_mines2.0


**edit**

Mapfact has a minepack too.

This testmission uses the SFM mines.

Mines with inbuild scripts run scripts with very fast loops (~0.001) because they have to check for nearby units.
Don't blame the authors , they did a wonderful job, there is no other way to do this , but it's a fact that lots of mines on your map can cause horrible lag.

This script simply creates mines somewhere in front of the player (or AI)  and delete them again when the player (or AI) and mine is 20m apart from eachother.

Check the readme.htm for instructions.



« Last Edit: 01 Sep 2004, 18:56:11 by Blanco »
Search or search or search before you ask.

rOk

  • Guest
Re:AP_minefield
« Reply #1 on: 01 Sep 2004, 13:01:34 »
Hi Blanco

You made a little typo in the demo mission...the trigger calls minefield.sqs when it should be AP-minefield.sqs.

Will test it now...

#edit

Coughs up this:

Code: [Select]
'waituntil = _time+(0.5+(10- _dens)) /#/' : error -: Type string, expected Number, Array
After looking at the scripts I found that there are no such lines in them...I'll try different mines
« Last Edit: 01 Sep 2004, 13:12:10 by rOk »

Offline Blanco

  • Former Staff
  • ****
Re:AP_minefield
« Reply #2 on: 01 Sep 2004, 18:43:28 »
lol, never script when you're too tired...  :P

You're right about that typo... I'll fix that.

About this :

Code: [Select]
'waituntil = _time+(0.5+(10- _dens)) /#/' : error -: Type string, expected Number, Array

The params are :

1 - thislist
2- Type of mine (that's a string!)
3- Density - a number between 0 - 10

You probably have a string as 3th parameter instead of a number, because I don't see anything wrong with that code...

oh, now I understand, in a previous version there was a fourth paramters, total number of mines that can be spawned in the minefield, but I deleted that param afterwards...

I'l fix that.

Actually, I got an updated version of this script with another fix.

- When you are standing still , the spawning of mines goes on and on. In the updated version, only mines will be spawned when you are moving and not in a vehicle.

Anyway, there's still another problem...

When men stay behind (20m), there's a possibility that mines will be spawned directly under your feet, without haveing the chance to see them first...No problem when it's only AI, but enoying when you are the player.
I need to find another way...

**edit**

Should be fixed now, see first post, same link.












« Last Edit: 01 Sep 2004, 18:59:32 by Blanco »
Search or search or search before you ask.

rOk

  • Guest
Re:AP_minefield
« Reply #3 on: 02 Sep 2004, 10:26:04 »
Good work

It works fine now.
But I have another question...in your readme you stated that this returns the class name
Code: [Select]
Hint format ["%1",typeof this]
All I'm getting is that I cannot confirm the changes when I write this down in init field of mine.  It would be most useful if this worked so that no more saving and opening mission sqs's would be necessary.
Am I doing something wrong here?

Offline Blanco

  • Former Staff
  • ****
Re:AP_minefield
« Reply #4 on: 02 Sep 2004, 17:53:30 »
Strange, typeof return the classname of the object.
Very useful command,but you need at least Resistance 1.75, I think.
Should work, I do it all the time.  ???






Search or search or search before you ask.

rOk

  • Guest
Re:AP_minefield
« Reply #5 on: 03 Sep 2004, 08:18:50 »
Well I have 1.96...