Home   Help Search Login Register  

Author Topic: Markers still giving me problems  (Read 686 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Markers still giving me problems
« on: 11 Jul 2004, 22:40:53 »
1: Having a problem with the following script. Its meant to generate a random number between 0 and 1000... then below it checks what number it came up with and then goes to a certain part of the script according to that number. This causes random palcement of a crashed blackhawk....

unfortunatly its not very random... it favours site 5 ALOT and 1 as well... i've never really had 3 or 4 appear... any ideas?


Code: [Select]
;#Script by toadlife (toadlife@hotmail.com)
;#Modified to suit by Messiah (messiah@project-ukf.com)

_rnd = random 1000
?_rnd <= 200:goto "move1"
?_rnd <= 400:goto "move2"
?_rnd <= 600:goto "move3"
?_rnd <= 800:goto "move4"
goto "move5"

#move1
[] exec "scripts\move1.sqs"
hint "1"
goto "finish"

#move2
[] exec "scripts\move2.sqs"
hint "2"
goto "finish"

#move3
[] exec "scripts\move3.sqs"
hint "3"

#move4
[] exec "scripts\move4.sqs"
hint "4"

#move5
[] exec "scripts\move5.sqs"
hint "5"

#finish
exit

2:

when the guy finds the crashsite i want a hidden marker to appear at the site.... now, the chopper is called chopdown and i want the marker to move to the chopper, but the command reference only gives the co-ord method...

i've tried:

"marker" getmarkerpos "object"

marker getmarkerpos "object"

"marker" getmarkerpos object

marker getmarkerpos ["object"]

marker getmarkerpos [object]


anyone know how to move the damn marker? also, i'm trying to make an empty marker turn into a objective marker, but it errors saying 'no entry config.bin objective marker' or something... so i got the name wrong i guess.

cheers for any help  :D



« Last Edit: 15 Jul 2004, 12:33:50 by Messiah »
Proud Member of the Volunteer Commando Battalion

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Random script not so random + Marker probs
« Reply #1 on: 11 Jul 2004, 23:05:55 »
1.  Just remember that there is a poor schmuck out there who wants a random number less than 1,000 but, because he is the unluckiest dude in the world, always gets 298.534 just by chance.    He's going nuts.

Actually in my limited experience of random things in ofp they tend to be a bit "sticky":  if you got 5 last time you are likely to get 5 this time too.     Can only suggest a hint so that you can see the _rnd and therefore spot if it is a problem with the script or the generation of the random number.


2.  Cut and paste from working script:-

"CSMmarker" setMarkerPos getPos (leader CSM);
"CSMmarker" SetMarkerType "Start"; "CSMmarker" setMarkerColor "ColorGreen"
« Last Edit: 11 Jul 2004, 23:11:44 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Random script not so random + Marker probs
« Reply #2 on: 12 Jul 2004, 11:40:40 »
cheers mac  :D
Proud Member of the Volunteer Commando Battalion

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Random script not so random + Marker probs
« Reply #3 on: 12 Jul 2004, 13:59:04 »
Since macca allready answerd 2 I'll just do 1.

1) See the differance:

#move1
[] exec "scripts\move1.sqs"
hint "1"
goto "finish"

compared to

#move3
[] exec "scripts\move3.sqs"
hint "3"

There is no 'goto "finish"'. When 3 is launched, scripts 3, 4 and 5 will also be launched, thus causing the chopper to move to location 5 since it was the last launched script. The same error is in the #move4.

:beat: *Gets Shot* :beat:

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Random script not so random + Marker probs
« Reply #4 on: 12 Jul 2004, 14:01:00 »
christ... i looked over these scripts so many times, yet still missed that... such a muppet  ::)
Proud Member of the Volunteer Commando Battalion

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Markers still giving me problems
« Reply #5 on: 15 Jul 2004, 12:35:19 »
back again, and a new script has the same problems:

Code: [Select]
;#Script by Messiah (messiah@project-ukf.com)

~3

titlecut ["", "white out", 2]
~2

?(alive hostage_1) : hostage_1 setpos [7135.69,6018.92,0.53]
?(alive hostage_2) : hostage_2 setpos [7118.77,6019.04,0.05]
?(alive hostage_3) : hostage_3 setpos [7102.84,6019.35,0.16]

hostage_1 setcaptive false
hostage_2 setcaptive false
hostage_3 setcaptive false

titlecut ["", "white in", 2]
~3

[hostage_1, hostage_2] join group player
?(alive hostage_3) : [hostage_3] join group player

~2

player sidechat "Hello Zero, this is Alpha. We have the Marines. Requesting extraction.

Over."

~6

? evacsite1 : goto "evac1"
? evacsite2 : goto "evac2"
? evacsite3 : goto "evac3"

"evacmarker" SetMarkerType "Flag1"
"7" ObjStatus "ACTIVE"

#evac1

hq sidechat "Roger that Alpha. Extraction at Golf Delta Five Two, LS Echo. Out."

"evacmarker" setMarkerPos getPos (evac_1)
"lz5" setMarkerSize [100,100]

@ presentevac_1

player sidechat "Hello Zero, this is Alpha. Be advised we are at LS Echo. Waiting for

extraction. Over."

~6

hq sidechat "Roger that Alpha. Extraction is at LS Echo. Out."

chop5 domove (getpos evac_1)

exit


#evac2

hq sidechat "Roger that Alpha. Extraction at Golf Delta Four Six, LS Echo. Out."

"evacmarker" setMarkerPos getPos (evac_2)
"lz6" setMarkerSize [100,100]

@ presentevac_2

player sidechat "Hello Zero, this is Alpha. Be advised we are at LS Echo. Waiting for

extraction. Over."

~6

hq sidechat "Roger that Alpha. Extraction is at LS Echo. Out."

chop5 domove (getpos evac_2)

exit


#evac3

hq sidechat "Roger that Alpha. Extraction at Foxtrot Golf Four Three, LS Echo. Out."

"evacmarker" setMarkerPos getPos (evac_3)
"lz7" setMarkerSize [100,100]

@ presentevac_3

player sidechat "Hello Zero, this is Alpha. Be advised we are at LS Echo. Waiting for

extraction. Over."

~6

hq sidechat "Roger that Alpha. Extraction is at LS Echo. Out."

chop5 domove (getpos evac_3)

exit

basically everything happens correctly minus that evacmarker does not turn into a flag... and i can't work out why not - its the correct name, its the correct synthax (as discussed earlier) so why won't it move? aaargh, i hate ofp sometimes

Proud Member of the Volunteer Commando Battalion

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Markers still giving me problems
« Reply #6 on: 15 Jul 2004, 17:21:35 »
anyone... mac? this is the last thing really holding up my mission  :'(
Proud Member of the Volunteer Commando Battalion

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Markers still giving me problems
« Reply #7 on: 15 Jul 2004, 17:43:21 »
Who, where and/or what is evac_1, etc.?

Are you sure the markertype is flag1 and not just flag?
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Markers still giving me problems
« Reply #8 on: 15 Jul 2004, 18:06:41 »
You should move the lines

"evacmarker" SetMarkerType "Flag1"
"7" ObjStatus "ACTIVE"

before the lines

? evacsite1 : goto "evac1"
? evacsite2 : goto "evac2"
? evacsite3 : goto "evac3"


And according to all programming rules, you should have some failsafe if none of the evacsiteX variables are true....
Even if that is not possible... It's 'pro', you see... ;D ::)
« Last Edit: 15 Jul 2004, 18:08:04 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Markers still giving me problems
« Reply #9 on: 15 Jul 2004, 18:25:48 »
You should move the lines

"evacmarker" SetMarkerType "Flag1"
"7" ObjStatus "ACTIVE"

before the lines

? evacsite1 : goto "evac1"
? evacsite2 : goto "evac2"
? evacsite3 : goto "evac3"


And according to all programming rules, you should have some failsafe if none of the evacsiteX variables are true....
Even if that is not possible... It's 'pro', you see... ;D ::)

you can't imagine how icnredibly silly i feel right now... lol  :-[

as for failsafe - the 3 conditions it searched for are created by a random number generating script that is executed by the init.sqs - hence it can't fail  ;)

i guess its true what they say, you always miss the obvious things - lol

cheers matey  :)
« Last Edit: 15 Jul 2004, 18:27:01 by Messiah »
Proud Member of the Volunteer Commando Battalion