OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: marcus3 on 16 Jan 2005, 22:27:05
-
ok now. i want it where when i radio alpha a car appears right beside me.
somebody know how to do this.
-
Make your Radio Alpha trigger......
In the Activation field put:
fred = "nameofmysupercar" createvehicle getpos player
fred can be any name of your choosing, but the name in quotes must be the correct object name.
Planck
-
it says "createvehicle" is un knowen
-
What exactly are you typing in the On Activation field of your trigger?
Planck
-
jason = "ferrari modena 360" createvehicle getpos player
and the same thing happens
-
You need to find out the cars proper object name.
Look in its config.cpp.
As a test try this:
fred = "skoda" createvehicle getpos player
Planck
-
ok i tried it and still says. un knowen opearator createvehicle. even with sportcar instead of skoda
i am playing opf ver 1.45 not res does that make a chang to things
-
But...............I have just tried the very same thing ingame........it works perfectly.
The default cars in OFP have the following class names:
Skoda
SkodaRed
SkodaGreen
SkodaBlue
Rapid
RapidY
The OFP sports car is in fact "Rapid" and the yellow one is "RapidY".
Planck
-
I am playing opf ver 1.45 not res does that make a chang to things.
-
Note that the quotation marks need to be there when you write it in your trigger's on activation field.
fred = "skoda" createvehicle getpos player
Ah I see the version problem now. Try camcreate instead of createvehicle. camcreate should make the car totally useless though..
-
It won't make a difference for the default OFP cars.......not too sure about the "Rapid" and "RapidY" though.
Also if the car you are trying is made for Resistance it might not work in 1.46.
However you will need to get the cars class name from the readme or config.
EDIT: createVehicle is ok for version 1.46
Planck
-
EDIT: createVehicle is ok for version 1.46
not for my 1.46 it's not. ;D
-
Hmmmmm.........According to my comref it was introduced in version 1.34.
Have you tried it again recently Artak?
Planck
-
Sorry Artak, but I just tried it in 1.46.......works ok here.
Try it again.
Planck
-
well, seeing as marcus isn't typing in the config name of the vehicle, I'd say that's what his problem is....
-
well, seeing as marcus isn't typing in the config name of the vehicle, I'd say that's what his problem is....
Yes, but he also said he couldn't get "skoda" to work either.
Unless he mistyped it.
Planck
-
ah, i misread his post
maybe he is getting the syntax wrong
copy this exactly from the post:
tommy = "jeep" createvehicle [(getpos player select 0) + 10,getpos player select 1,0]
if that doesn't work then you won't be able to use createvehicle
-
Yeah Planck, I just tried it earlier. That's why I was so sure to say the command wasn't working with 1.46 :o
-
dang. i cant get it to work it says. "unknowen operator createvehicle"
so i guess i just need to wait for my copy of res to get here o well. thanks for your time.
-
Creating things usually does work. To get round this while you find a solution why not put the car on some offshore island and setPos it to where you want it when you want it to appear
-
unit = "skoda" createvehicle (getpos player)
Curse of the missing brackets, maybe? ;)
-
nope still dont work. thats crap my PC must be goofing up.dang. is there some other way to do this?
-
You maybe missed my earlier post
Creating things usually does work. To get round this while you find a solution why not put the car on some offshore island and setPos it to where you want it when you want it to appear
-
yep THobson is right, setPos is the way to go. I remember quite surely, cause I used that trick quite a lot in those days.
-
ok i tried the setPos thing and no go. how do you do it the right way i put in the A field.
Car setPos Jason
and some junk comes up on top.
-
jason is a unit not a position.
car setPos getPos jason
would put the car on top of jason
car setPos [(getPos jason select 0)+5*sin(getDir jason),(getPos jason select 1)-5*cos(getDir jason),0]
would put the car 5 meters to jason's right.
Bye the way it is not junk. Find the #and that is where the error is. The text tells you what the error is.
-
ok its not junk sorry. that works but then i cant get in the car. that sucks some way to fix that???
-
unlock it
when you place it it has the option of having it locked (don't lock it and there you go)
-
ok is working now. (i gotta quit drinking befor i play) kidding ;D
but all is as i wood like it do be so everbody. your dumb. kidding.
thanks