Home   Help Search Login Register  

Author Topic: unit camcreate move help  (Read 889 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
unit camcreate move help
« on: 08 Jun 2003, 03:31:16 »
hi ok i need some help with defence script im working on. my problem is when i camcreate useing:
Code: [Select]
unitid="unit" camcreate [_x -0, _y -0, _z -0]and then send the unit in gunner of a m2 pod the unit jumps in but dose not fire or move he just sits there. How do i script my units to after camcreate run to the m2 and get in as gunner and defend i hope you can help

_hammy_

  • Guest
Re:unit camcreate move help
« Reply #1 on: 08 Jun 2003, 03:41:58 »
you could camcreate the dude next to the m2 then use this command

unitname moveingunner m2_name

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:unit camcreate move help
« Reply #2 on: 08 Jun 2003, 13:16:00 »
i did that but it gets in gunner but dont fire when enemy is lose
« Last Edit: 09 Jun 2003, 16:14:01 by wizzywig »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:unit camcreate move help
« Reply #3 on: 08 Jun 2003, 16:28:03 »
use createunit command

from da command referance

Quote
type createUnit unitInfo

Operand types:
type: String
unitInfo: Array
Type of returned value:
Nothing
Description:
Create unit of given type . Format of unitInfo is: [pos (Position),group (Group), init (String), skill (Number), rank (String)] Note: init, skill, and rank are optional, default values are "", 0.5, "PRIVATE".

Example:
"SoldierWB" createUnit [getMarkerPos "barracks", groupAlpha]

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

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:unit camcreate move help
« Reply #4 on: 09 Jun 2003, 16:13:06 »
is there any chance of a simple mission sample please so i can see what i neeed to do please just put in what i need so its simple to work out.

thanks alot for the help

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:unit camcreate move help
« Reply #5 on: 09 Jun 2003, 17:46:35 »
No example mission needed. Here's the line for you

"SoldierWB" createunit [getpos M2name, groupname, "M2gunner = this; M2gunner moveingunner M2name",0.3]

"SoldierWB" is the string name for a basic western soldier.
M2name is the name of the M2 the unit should mount.
groupname is the name of the group in which the unit will be created. Note that you can not create units without having an existing group on the map. If you want to you can later on use the   [unitname] join grpnull   to make him leave the group where he was created.
The commands inside the brackets are the units 'init line'. they will be executed once the unit is created.
0,3 is the skill of the unit. It can vary between 0 and 1, 1 being the most skilled.
you could also have "rank" after the skill command but that's not really necessary.


Createunit command is slightly more complicated than camcreate, because camcreated units are plain dummies and can't do nothing.
Look at reference of the Createunit command LDC posted and apply it to the example line I gave.
Not all is lost.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:unit camcreate move help
« Reply #6 on: 09 Jun 2003, 21:12:11 »
Look at reference of the Createunit command LDC posted and apply it to the example line I gave.

its LCD bitch (dont take it hard k ? ;)) ;D :P

i got short name - canyt u just right it right :wow:

LCD OUT
« Last Edit: 09 Jun 2003, 21:12:48 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:unit camcreate move help
« Reply #7 on: 09 Jun 2003, 21:45:47 »
rofl  ;D

where do I always get that LDC from.. hmm.. must have been some bad acid at that
janis Joplin party in the 70's..  ::)
Not all is lost.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:unit camcreate move help
« Reply #8 on: 09 Jun 2003, 23:10:11 »
u know wat ?

as apoligize - send me som of dat acid - it looks like good 1 :toocool: (ny1 know weres da :dude: smily is ???  ;D)

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