OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: netta1234 on 17 Jul 2004, 01:15:57

Title: Foolish Question
Post by: netta1234 on 17 Jul 2004, 01:15:57
how do i addaction with a script? not with a trigger

netta you r a fucking noob
Title: Re:Foolish Question
Post by: Artak on 17 Jul 2004, 01:49:15
Just like you would do it in a trigger?

Quote
unit addAction action
Operand types:
    unit: Object
    action: Array
Compatibility:
    Version 1.1 required.
Type of returned value:
    Nothing
Description:
    Create an action. Action ID should be returned, but due to bug it is not. Action ID should be returned, but due to bug it is not. To determine action ID use following algorithm: first action added to given vehicle has ID zero, next has ID one, etc.

Example:
    player addAction ["Hello", "hello.sqs"]

What seems to be your problem? It shouldn't be any different to add an action in a script than it is in a trigger.
Title: Re:Foolish Question
Post by: netta1234 on 17 Jul 2004, 03:02:55
can you make the code with out Exsambles?
Title: Re:Foolish Question
Post by: macguba on 17 Jul 2004, 11:47:08
The code is the same whether you put it in a trigger or a script.    I suspect you are not sufficiently familiar with scripts:   read snYpir's Friendly Intro to Code Snippets and Johan Gusafsson's Scripting Guide, both in the Ed Depot.
Title: Re:Foolish Question
Post by: netta1234 on 17 Jul 2004, 15:08:55
nice i got it to work