Home   Help Search Login Register  

Author Topic: Some general issues  (Read 459 times)

0 Members and 1 Guest are viewing this topic.

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Some general issues
« on: 17 Jul 2005, 01:51:40 »
Hello comunity!!! im .."back"? again... and Im playng the "Campaña de Malvinas" mod... it is about all the Falklands war betwen Argentina and England... I was just making a mission and suddenly I fell like I forgeth a part of mi knowledge of scritping... so these are my little troubles:
(Please forgeth mi english... as allwise)

A bunch of guys must attack a Enemy town, and when them dissembark from a Truck, a barrange begins... I ussed a "own made" script... wich is very basical and very... er... primitive :P
Assuming that posicion_2 is an H(invisible)on any position, _p2 = getpos posicion_2 and _bom = "shell125"

this seems to dont work... :s Why?
Code: [Select]
~(1 + random 3)
_bomba = _bom createVehicle _p2
~(1 + random 3)
etc etc..
and What im triing (or I just wonder) to do is the folowing: when the Radio Operator dies(but it may not.., only when it dies), and the town is defated (Easly whit trigger), The leader says that someone needs to be carring the Radio, and here is my issue, How to make an non-human soldier go to the dead body of the radio op, and get it??? I was thinking in a script wich wile the radio op is alive, setpos an H invisible under him.. and domove a alive soldier calling him from group select X.. and taking the weapon whit the command for doing it (i dont remeber it now), assuming that RadioARG is the class name of the radio (it is a secoundary weapon).. how may the script be?!?!?!?!?

Thanks a lot!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Some general issues
« Reply #1 on: 17 Jul 2005, 15:06:53 »
first problem - 'createvehicle' is the incorrect command. try

Code: [Select]
_bom = "shell125" camcreate getpos posicion_2
second problem - assuming the guy with the radio is called 'radio_loon', and his group is called radio_group, make a trigger...

'condition' -

Code: [Select]
not (alive radio_loon)
'on activation'

Code: [Select]
rad_pos = getpos radio_loon
make another trigger which fires when the town is taken and radio_loon is dead, and make it run the following script...

Code: [Select]
;collect radio

;create a fake radio at old radio loon's position
_fake = "Radio" camcreate rad_pos

;how many are alive
_units = {alive _x} count units radio_group

;assign radio to last alive loon in group
_new_radloon = radio_group select _units

;tell new radio guy to go to old radio guy's position
_new_radloon domove rad_pos

;wait until he gets there
#loop
~1
?not (_new_radloon distance _fake <=2):goto "loop"

;make it look like the new radio loon is picking something up
_new_radloon switchmove "CombatToPutDown"

;get rid of the fake
deletevehicle _fake

;give new radio loon a radio
_new_radloon addweapon "RadioARG"

;tell everyone
player sidechat format ["%1 has the radio!",name _new_radloon]

;get new radio loon back into formation
_new_radloon dofollow leader radio_group

exit

untested, but that should work. it should give you an idea of how to do it at any rate ;)
« Last Edit: 17 Jul 2005, 15:09:12 by bedges »

Offline Blanco

  • Former Staff
  • ****
Re:Some general issues
« Reply #2 on: 17 Jul 2005, 17:40:27 »
Just a sidenote...

Quote
first problem - 'createvehicle' is the incorrect command. try

AFAIK you are able to create bombs with createvehicle. actually I believe you HAVE to create them with createvehicle when you want it MP compatible.

« Last Edit: 17 Jul 2005, 17:40:49 by Blanco »
Search or search or search before you ask.

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:Some general issues
« Reply #3 on: 17 Jul 2005, 20:55:09 »
Thanks a lot bedges!! I think the problem is solved for now on.... I will be testing the script right now!

Cheers!