Home   Help Search Login Register  

Author Topic: How to check if east within 10m of player?  (Read 650 times)

0 Members and 2 Guests are viewing this topic.

Daneel

  • Guest
How to check if east within 10m of player?
« on: 13 Feb 2003, 07:44:11 »
Subject says it all.
How can I check if any unit of a given side (east, guerr, west) is within a certain distance of my player?

mcnils

  • Guest
Re:How to check if east within 10m of player?
« Reply #1 on: 13 Feb 2003, 08:00:57 »

Well i can help you with the "teoretical part",
for the real script, i let talk the pro's here since im not one of 'em  :-\


Make a trigger that is activated by east, set its radius to 10m, elipse.
name it "trigger1" (for example), then create an external sqs script witch does loop (every 10 seconds or so) a "trigger1 setpos player"... hope i got you to understand what i mean, practically the trigger follows the player.


Now we only need someone that knows how to doo this hole thing, lol  ::)
« Last Edit: 13 Feb 2003, 08:01:29 by mcnils »

mcnils

  • Guest
Re:How to check if east within 10m of player?
« Reply #2 on: 13 Feb 2003, 08:08:04 »

Code: [Select]
#loop

~10

Trigger1 setpos [getpos Player select 0, getpos Player select 1, (getpos Player select 2)+0]

goto "loop"







I think it would look like this..
nothing shure cuz im a scripting beginner...  ???

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:How to check if east within 10m of player?
« Reply #3 on: 13 Feb 2003, 08:38:32 »
as mcnils I can only speak in theory.

First determine which side your player is on and then
you could try to put in the trigger you just created ^ up there the followin into it's condition field.

EAST in thislist countside > 0 and GUER in thislist countside > 0 and WEST in thislist countside > 0

if your player would be west the previous would then look like this

EAST in thislist countside > 0 and GUER in thislist countside > 0 and WEST in thislist countside > 1
Not all is lost.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:How to check if east within 10m of player?
« Reply #4 on: 13 Feb 2003, 12:36:30 »
basicly Artack and mcnils idea wil work but u can also make lot more acurate thing ;)

make array of all east units in da game (easily done but makin triger covering da whole mision area wid east present as conditin and eastunits = thislist onactivision) and den just use dat condition

@ "_x distance player <= 10" count eastunits > 0

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta