Home   Help Search Login Register  

Author Topic: Oh no... Not Armsty and his n00b Qs again...  (Read 1570 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Oh no... Not Armsty and his n00b Qs again...
« on: 02 Oct 2003, 21:27:53 »
OK, hi all! Looks who's back with a new n00b Q again? Yup, me!

<advertising>
I asked this @ Gameers NPD 2 forums, but it's down at the moment
</advertising

WTF is wrong with this script? It's a primitive script that'll update so it'll get better later. It's for making a base more alive.

Code: [Select]
_unit = _this select 0

@ (stoner distance _unit <= 3)

_rand = random 4

? _rand <= 4 : ["Hi, what's up?", "PLAIN DOWN"]; goto "anim"
? _rand <= 3 : ["Yo! Something new Stoner?", "PLAIN DOWN"]; goto "anim"
? _rand <= 2 : ["Hey Stoner! Lend me a cigg would ya?", "PLAIN DOWN"]; goto "anim"
? _rand <= 1 : ["Hey Stoner, I think the captain wanted to talk to you, have you seen him?", "PLAIN DOWN"]; goto "anim"
#anim
? _rand <= 4 : _unit switchmove "foldonesarms"; goto "exit"
? _rand <= 3 : _unit switchmove "FXCivilLookaround1"; goto "exit"
? _rand <= 2 : _unit switchmove "FXCivilLookaround2"; goto "exit"
? _rand <= 1 : _unit switchmove "FXCivilArmsAkimboL"; goto "exit"
#exit
exit

That didn't work so I thought the distance command was screwing up, and I added this after the distance line:

Code: [Select]
hint "yo! wazzzzzzzzzzzzzzzzzzup!?"
Just to see if it worked, and it did. Looks like it's the random command is wrong, and I've used it like this a billion times... WTF is wrong?

:beat: *Gets Shot* :beat:

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #1 on: 02 Oct 2003, 21:43:55 »
Quote
? _rand <= 4 : ["Hi, what's up?", "PLAIN DOWN"]; goto "anim"

The problem is that you can't have more than one command in a ?condition statement. You need to either use an if-then construct, or you need to break it up into two lines, as follows:

? _rand <= 4 : ["Hi, what's up?", "PLAIN DOWN"]
? _rand <= 4 : goto "anim"

And by the way, I find it funny that you use the word n00b :P
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Drozdov

  • Guest
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #2 on: 02 Oct 2003, 21:50:24 »
You're using ";" instead of ":" in your ": goto" bits.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #3 on: 02 Oct 2003, 22:15:32 »
OK Barron, so now it looks like this:

Code: [Select]
_unit = _this select 0

@ (stoner distance _unit <= 3)

_rand = random 4

? _rand <= 4 : ["Hi, what's up?", "PLAIN DOWN"]
? _rand <= 4 : goto "anim"
? _rand <= 3 : ["Yo! Something new Stoner?", "PLAIN DOWN"]
? _rand <= 3 : goto "anim"
? _rand <= 2 : ["Hey Stoner! Lend me a cigg would ya?", "PLAIN DOWN"]
? _rand <= 2 : goto "anim"
? _rand <= 1 : ["Hey Stoner, I think the captain wanted to talk to you, have you seen him?", "PLAIN DOWN"]
? _rand <= 1 : goto "anim"
#anim
? _rand <= 4 : _unit switchmove "foldonesarms"
? _rand <= 4 : goto "exit"
? _rand <= 3 : _unit switchmove "FXCivilLookaround1"
? _rand <= 3 : goto "exit"
? _rand <= 2 : _unit switchmove "FXCivilLookaround2"
? _rand <= 2 : goto "exit"
? _rand <= 1 : _unit switchmove "FXCivilArmsAkimboL"
? _rand <= 1 : goto "exit"
#exit
exit

Still ain't working :-\

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #4 on: 02 Oct 2003, 22:20:41 »
Post the mission plz, and I'll try to debug.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #5 on: 02 Oct 2003, 22:51:18 »
Hell, you lotta guys can't see the forrest because of
so many trees there  ;D

First off:

? _rand <= 4 : ["Hi, what's up?", "PLAIN DOWN"]

The condition <=4 right as first condition will always be
true because it's always <=4  ;)

And ["HI, what's up?","PLAIN DOWN"] without the
titleText/Cut won't do anything, and so it will
be with the following goto statement.

You "can" combine commands, using the ";" semicolon, but
in your case it's not working because of the missing titletext
in the first command.

btw - i would do the whole stuff in a different way, using
arrays  and one random selector. ;)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline rhysduk

  • Former Staff
  • ****
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #6 on: 02 Oct 2003, 23:45:56 »
This is far too complicated to be located in the General Board  ???

Or is it just me  ;D ME aint got a bleeding clue about the _rand thingy migjig..

I aint going to get into it either unless i need to ;D

Chao
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #7 on: 03 Oct 2003, 01:28:39 »
Nah, I think this is ok for the general board.

_rand is just a local variable that is defined at the start of the script.    In this case it's a random number between 0 and 4.
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #8 on: 03 Oct 2003, 11:34:38 »
DOH!!! How can I miss the titletext!?!?!

*Bangs himself in a table*

:beat: *Gets Shot* :beat:
« Last Edit: 03 Oct 2003, 20:56:55 by The real Armstrong »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Oh no... Not Armsty and his n00b Qs again...
« Reply #9 on: 03 Oct 2003, 20:58:56 »
There's still no animation... :-\

:beat: *Gets Shot* :beat:

EDIT: Nevermind... I figured it out now. Looks like some animations, even FXs, required that the soldier had a weapon in his hand, I had removeallweapons him.

Cheers!
« Last Edit: 03 Oct 2003, 21:07:10 by The real Armstrong »