"not war related": question on a script.

English discussion about Arma III and LDD Kyllikki

Moderators: Kegetys, Broileri

Post Reply
65-1045843376

Post by 65-1045843376 » Fri, 21.2.2003, 18.13

Hey there.

This is SSG Animal_Mother from SWAFs S4 Dept. (Research&Developement).
As yu probably know already, our Dept. is doing/testing maps and addons for SWAF.

I currently am working on a map (that is not war related) and ran into a problem.

I created a sentry AI on an entry/exit of a base which is closed with a gate. Now, when a soldier steps into the trigger in front of that gate, I want that sentry to greet HIM (and only him), check his ID and open the gate.

I have all that realized. The only problem is, that the text, that the sentry says, is seen by ALL units on the map. Even if they are miles away. It should be only visible to people inside a 5m diameter around the actual sentry, or just the person who actually stepped into the trigger though.

Would be easy if there was only 5 slots in the map, but there will be 30+ slots. And if someone is several kilometers away, it wouldn't be really sensefull if he could be able to read the "welcome message".

Is there a way to do it? By direct speech maybe? if yes, how?
Keijo

Post by Keijo » Fri, 21.2.2003, 18.30

Make a script, for example hello.sqs with something like:

Code: Select all

? player != _this : exit
titletext["Hello there","plain down"]
and run this from the tigger with:

Code: Select all

(thislist select 0) exec "hello.sqs"
It doesnt work though if there are multiple players inside the trigger at the same time.

- Kegetys[/color]



Edited By admin on 1045845112
65-1045843376

Post by 65-1045843376 » Fri, 21.2.2003, 18.34

cheers for the help.

Do you mean it doesn't work for the others, when one already runs this script? Or doesn't it work for anybody then?
I mean: Does it still work for that person who stepped in first?


Nice avatar btw...lol :D
Keijo

Post by Keijo » Fri, 21.2.2003, 18.42

I would guess that when the first guy steps inside the trigger area, he gets the message, and if another guy steps in there too the first guy still inthere will get another message.

- Kegetys
65-1045843376

Post by 65-1045843376 » Fri, 21.2.2003, 22.24

cheers mate...worked like a charm :) :cool: :banana:
Post Reply