OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: YacieK on 16 Jun 2008, 22:12:19

Title: I need help
Post by: YacieK on 16 Jun 2008, 22:12:19
I greet :)

I need hrlp in writing script. I is not known on it. I want to give flag to vehicle. After fire by enemy i would like in order to flag has been changed on other.
                             
                                                                                      Regards
Title: Re: I need help
Post by: Mandoble on 16 Jun 2008, 22:17:47
So you have two vehicles, one has a flag, if damaged the flag should be moved to the second vehicle, right?
Title: Re: I need help
Post by: YacieK on 16 Jun 2008, 22:42:29

Have PBR II with flag. I would like in order to flag was shot after fire on. Textures are ready,
writing of script is problem discover for  fact of shooting  so PBR.   

I apologize for my english - regards Yac
Title: Re: I need help
Post by: loki72 on 16 Jun 2008, 22:50:04
sounds like:

1 pbr2 with a flag attached...
when the pbr takes fire the flag texture changes from normal to his damaged texture?

Title: Re: I need help
Post by: YacieK on 16 Jun 2008, 22:59:31
Quote
when the pbr takes fire the flag texture changes from normal to his damaged texture?
Exactly :)

Title: Re: I need help
Post by: loki72 on 17 Jun 2008, 04:23:42
i'm good at broken english.. all the bier :whistle:

ok.. i like a new challenge.

to try to visualize what you want... (sla flag):
(http://img247.imageshack.us/img247/8432/yacie1oq1.jpg)

and after impact the flag changes to... (racs flag in this example):
(http://img206.imageshack.us/img206/8601/yacie2oh3.jpg)

if so.. a couple of things are needed:

1. a way to attach the flag to the boat and keep it moving in real time with the boat.
2. the boat needs an 'event handler' for the 'hit' in order to fire off the "change_flag_texture.sqf"

this is as far as i can take you.  :)

Title: Re: I need help
Post by: YacieK on 17 Jun 2008, 06:05:07
thx  :clap:
Title: Re: I need help
Post by: i0n0s on 17 Jun 2008, 12:44:29
Wouldn't it be easier to set the boat as flagcarrier?
Title: Re: I need help
Post by: Planck on 17 Jun 2008, 14:32:16
FlagCarrier?

The class FlagCarrier is already configured to use vlajkstozar.p3d (Flagpole to you and me).

Unless you meant something completely different.   :D


Planck
Title: Re: I need help
Post by: Mr.Peanut on 17 Jun 2008, 14:36:42
He means setFlagOwner (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#296).
Code: [Select]
Flag_Obj = "FlagCarrier" createVehicle [0,0]
Flag_Obj setFlagTexture FlagPath
Flag_Obj setFlagOwner player
Code snippet taken from Dog of War's Flag Bearer/Ammo Bug mod.