Home   Help Search Login Register  

Author Topic: get in jeep script  (Read 1103 times)

0 Members and 2 Guests are viewing this topic.

Dominaatori

  • Guest
get in jeep script
« on: 07 Nov 2004, 22:22:56 »
yeah I was wondering why this script doesn't work :) there are probably a million reasons. Im a total noobie to scripting for ofp. I don't know what scripting language its based on, im familiar to c++ so... well here it is

; Conversation one between self and officer

_Officer = _this select 0
_Self = _this select 1
_Car = _this select 2

[_Officer] AssignAsDriver _Car
[_Self] AssignAsCargo _Car

TitleText["Get in the car, we are going to drive to an airport nearby", "plain down"]

~3

[_Officer] OrderGetIn true
[_Self] OrderGetIn true
exit

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:get in jeep script
« Reply #1 on: 07 Nov 2004, 22:46:17 »
 You should give us the error message exactly as it appears......if there is one.

Any way try this:

_officer = _this select 0
_self = _this select 1
_car = _this select 2

_officer assignAsDriver _car
_self assignAsCargo _car

TitleText["Get in the car, we are going to drive to an airport nearby", "plain down"]

~3

[_officer, _self] orderGetIn true
exit

Although.if _self is the player, I doubt you can force the player to get in a vehicle.

Planck
I know a little about a lot, and a lot about a little.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:get in jeep script
« Reply #2 on: 07 Nov 2004, 22:54:48 »
This may also help:

_officer = _this select 0
_self = _this select 1
_car = _this select 2

disableuserinput true

_officer assignAsDriver _car
_self assignAsCargo _car

TitleText["Get in the car, we are going to drive to an airport nearby", "plain down"]

~3

[_officer, _self] orderGetIn true
disableuserinput false
exit

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:get in jeep script
« Reply #3 on: 08 Nov 2004, 01:06:00 »
Planck is correct, the assignAs commands take an object, not an array.  It is the square brackets [ ] that are messing things up.
Plenty of reviewed ArmA missions for you to play

Dominaatori

  • Guest
Re:get in jeep script
« Reply #4 on: 08 Nov 2004, 12:04:30 »
well ok but I have tried without the [] brackets on the assignas command but still didn't work ? ? ? I have tried almost every way. Still doesn't work? ??
But u mean it should be _Officer AssignAsDriver _Car ? not [_Officer] assignasdriver _Car ?

And yeah I didn't want the player to be forced in the car, I just wanted the yellow arrow to pop up. How do you do that ?

Ok when I get home I will check the error message out, im writing this from work.
« Last Edit: 08 Nov 2004, 12:06:56 by Dominaatori »

Dominaatori

  • Guest
Re:get in jeep script
« Reply #5 on: 08 Nov 2004, 14:18:49 »
Yeah the error messages were:
on the assignas this error came: Error type string, expected object
and on the ordergetin this error came: Error type string, expected array

Dominaatori

  • Guest
Re:get in jeep script
« Reply #6 on: 08 Nov 2004, 14:33:01 »
Ok I fixed it, no errors come but the officer still doesnt get in the car !?
here is the script

; Conversation one between self and officer

_officer = _this select 0
_self = _this select 1
_car = _this select 2


"_officer assignAsDriver _car"
"_self assignAsCargo _car"

TitleText["Get in the car, we are going to drive to an airport nearby", "plain down"]

~3

[_officer] orderGetIn true
exit

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:get in jeep script
« Reply #7 on: 08 Nov 2004, 15:28:41 »
Now that's all wrong.. using the "" on the assignAs part... ::)
Weird that it does not give you an error message...

How do you call the script??
Judging from the error messages you call like ["officername","playername","carname"]
should be called
[officername,playername,carname]...

The unit names (the names you have given them) are global variables, not strings..


I may be totally 'off the charts' though :P...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Dominaatori

  • Guest
Re:get in jeep script
« Reply #8 on: 08 Nov 2004, 20:44:38 »
Your right... im so embaressed  :-[, I didn't notice it. Of course you cannot use "" signs when objects are the case.