Home   Help Search Login Register  

Author Topic: condition of presence and init.sqs  (Read 1648 times)

0 Members and 1 Guest are viewing this topic.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
condition of presence and init.sqs
« on: 24 Aug 2007, 09:21:36 »
im just makin a mision and 4 da 1st time im tryin 2 use da condition of presence... nd it seems dat it doesnt matter if i set da variable true... usin da init.sqs or even da players init.... is dere nyway 2 make da condition of presence work ?

i have 5 vulcans.... each 1 have condition called vulcan1,vulcan2....vulcan5

in da init i added da line

vulcan5 = true

and da fifth vulcan doesnt appear....

also i tried randomizing usin

Code: [Select]
_num = (floor (random 5)) + 1
call compile (format ["vulcan%1 = true",_num])


but nothin seems 2 make da vulcan apear  :(

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Cheetah

  • Former Staff
  • ****
Re: condition of presence and init.sqs
« Reply #1 on: 24 Aug 2007, 09:59:51 »
You might want to take a look at this.

It might work (not tested) if you give the 1st unit you place all the information required for the variables. Hopefully they get executed first, don't forget to include vulcan1=false, vulcan2=false etc.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: condition of presence and init.sqs
« Reply #2 on: 24 Aug 2007, 10:05:58 »
interesting read... but as im usin some scriptin 4 dat... nd i hate 2 script in da init field of units... ill probably find a workaround  :(

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: condition of presence and init.sqs
« Reply #3 on: 24 Aug 2007, 14:32:47 »
If you want the vulcans to appear randomly, just "script" that into their initialization fields (or just turn the % slider around ;)), and that'll do it for that. Tell us more about your situation, maybe we can help. I.e:

You want 2-5 vulcans to appear with a random chance: -> Make 2 vulcans have a 100% presence, the rest whatever % you need. You want these vulcans to appear in random locations (random pre-defined ones, but not the same all the time, i.e., the two 100% would always appear anyway) -> do the old "group with marker" trick to get them to appear randomly. Although I guess that might lead to two vulcans appearing on the same marker with a bit of bad luck :)

Otherwise, some creative deleteVehicle'ing and scripting should get things done. The condition of presence field is a fickle mistress, and not really necessary. Useful for campaign scripting and stuff like "!cadetMode" and whatnot.

 :good:

Wolfrug out. 
"When 900 years YOU reach, look as good you will not!"

Offline Cheetah

  • Former Staff
  • ****
Re: condition of presence and init.sqs
« Reply #4 on: 25 Aug 2007, 09:36:24 »
From where do you execute the script?
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: condition of presence and init.sqs
« Reply #5 on: 26 Aug 2007, 00:22:09 »
More than probably conditions of presence are checked before executing init.sqs or init.sqf.