Home   Help Search Login Register  

Author Topic: A cuple of questions  (Read 893 times)

0 Members and 1 Guest are viewing this topic.

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
A cuple of questions
« on: 27 Jan 2003, 10:45:20 »
Hi all.
  I noticed that when sniping If I miss the first shot no a single unit care about it and thei just stand still or doing what the waypoint say instead of run or look for me.I would like to know if is there a way to activate a trigger from the very second a wapon gets fired. What I do is to change everyones behaviour like if it was in real life. I tryed lots of different things, but none of them seem to be reliable, they change from one game to the other, so if anyone knows how to activate a triger by a shot, please let me know, please, please please... ;D
@cero.

   
SCREWBY!!!

vektorboson

  • Guest
Re:A cuple of questions
« Reply #1 on: 27 Jan 2003, 11:40:07 »
player addEventHandler ["FIRED", "myValue=true"]

that's one possibility, but you should use an EventHandler for this!

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re:A cuple of questions
« Reply #2 on: 27 Jan 2003, 18:22:35 »
Event handler, isn't that a kind of script? ;D I know, I should know by now.
 I'll get some info about it, at list you can tell me how to create the even handler ;D cheekyyyyy, lol
@cero
SCREWBY!!!

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:A cuple of questions
« Reply #3 on: 27 Jan 2003, 18:37:35 »
Did you read the ComRef?  


object addEventHandler handler
Operand types:
    object: Object
    handler: Array
Type of returned value:
    Number
Compatibility:
    Version 1.85 required.

Description:
    Format of handler is [type,command]. Check scripting topic Event handlers for more information. Index of currently added handler is returned.

Example:
    player addEventHandler ["killed",{_this exec "playerKilled.sqs"}]


I'm certain you didn't search, either, so I'll be friendly and post the answer to your next question, "What event handlers are there?"


Event handlers

Description:
Event handlers can be defined in unit config or by function addEventHandler. Multiple handlers can be attached at one time. Event handler types are defined below. Each handler receives arguments in _this, argument types and meaning are defined below.

"Killed" object:killer
"Hit" object:causedBy,scalar:howMuch
"Engine" bool:engineState

"GetIn" string:position (1),object:unit
"GetOut" string:position (1),object:unit

"Fired" string:weapon,string:muzzle,string:mode,string:ammo
"IncomingMissile" string:ammo,object:whoFired
"Dammaged" string:selectionName,scalar:howMuch
"Gear" bool:gearState
"Fuel" bool:fuelState

"Init" No arguments

(1) position can be "driver", "gunner", "commander", "cargo"

MP notes: "Killed" and "Hit" event handlers are executed where given unit is local. All other event handlers are executed on all computers. Events added by addEventHandler may be different on each computer.
Ranger

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re:A cuple of questions
« Reply #4 on: 28 Jan 2003, 07:50:09 »
Did you read the ComRef?  
Well, do you? I mean, like from top to botton, no, I didn't, and I certanly don't look at something and say, oh, this have to do with Event Handlers, when I don't even know what a Event Handler was :o :o :P ;D Sorry if I P you off :-\ :'( ::)

Quote
I'm certain you didn't search, either, so I'll be friendly and post the answer to your next question, "What event handlers are there?"
Actually, I did, so I put Event Handler in the search thingy, and I get 3 results, and only one have to do with it :o ;D I may spell it whrong and all, my english is going backwards, you know? LOL ;D

In conclusion, thanks alot for you help and for being friendly, in this sad world the last thing you would espect from people is being friendly.
TY.
@cero
SCREWBY!!!