Comrades in Arms Discussion Board

Full Version: Stupid Chinook will not fly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
<BR>
<BR>so General has agreed that I can post here.
<BR>
<BR>I have the problem, that I cannot get the Chinook to fly, when created inside a script.
<BR>
<BR>Here´s the script:
<BR><--
<BR>; get player
<BR>_Player = _this select 0
<BR>; get coordinates of the player
<BR>_camx = getpos _Player select 0
<BR>_camy = getpos _Player select 1
<BR>_camz = getpos _Player select 2
<BR>; create a pilot near player
<BR>_pilot = "SoldierWPilot" camCreate [_camx-10,_camy,_camz]
<BR>; create heli near player
<BR>_heli = "CH47D" camCreate [_camx-10,_camy,_camz]
<BR>; get pilot in heli
<BR>_pilot MoveInDriver _heli
<BR>; start engine of the heli
<BR>_heli Action["ENGINE ON"]
<BR>; wait 10 seconds till engine is on full power
<BR>~10
<BR>; only for testing if all is working
<BR>DeleteVehicle _heli
<BR>? !(Getdammage man < 1) : CamDestroy _pilot;
<BR>Exit;
<BR>
<BR>
<BR>
<BR>So I have tested with _heli Action["hover"] and [_heli,0] SetWpPos [_camx-100,_camy] but nothing works. Also I have created the heli with _camz+1000 and _heli FlyInHight 100. But also don´t work.
<BR>
<BR>
<BR>Hope someone can help how I can get the heli to start and fly. Need this for Intro. Don´t want to use a normal unit for this, cause too much units than in map.
<BR>
<BR>Thanks and Greets
<BR>
<BR>Lobanak
<BR>
<BR>_________________
<BR>[root@rescue] # dd if=/dev/zero of=/dev/hda
<BR>25410671+0 records in
<BR>25410671+0 records out
<BR>[root@rescue] # ... f**k s**t !!! no backup made !!!<BR><BR><font size=-1>[ This Message was edited by: Lobanak on 2002-01-30 00:00 ]</font>
i assume you have read the updated command reference and you have certainly done it right BUT the thing is that the create command does not work properly here i guess. even assigning waypoints to a lets say "spawned" unit is not possible or not working. check ofpeditingcentre for details. They have a thread about that in the Forum.
<BR>Why dont u just add units and remove them afterwards if u dont use them anymore? Also think about spawning units with triggers or waypoints. so there will never be to much units on a map. Let´s say you proceed from one waypoint to another. set a trigger in desired area and spawn the units (vehicles work also). The trick is to remove the units that are defeated dead or done behind you. The player wont get it cause he moves along his waypoints to finish mission and the performance always stays up good. Just a tip.
<BR>3rd way is the easiest. create empty chinok vehicle set it in air with setpos and this flyinheight command and add the soldiers you like and beam them in with the init field. i personally doubt that 3 more units will slow your map down dramatically. but no problem after finishing your cutscene or whatever let them fly into a trigger and remove them from map.
<BR>Hope this will give you some ideas <IMG SRC="/phpBB/images/smiles/icon_smile.gif">
Check this link for detail
<BR>
<BR><!-- BBCode auto-link start <a href="http://www.ofpeditingcenter.com/cgi-bin/YaBB/YaBB.pl?board=board_general_editing&action=display&num=1011876877&start=0" target="_blank">http://www.ofpeditingcenter.com/cgi-bin/YaBB/YaBB.pl?board=board_general_editing&action=display&num=1011876877&start=0</a><!-- BBCode auto-link end
Hi all,
<BR>
<BR>thanks for the answers.
<BR>
<BR>Now that I was using an old commandreferenz, I could not find the ´CreateVehicle´ and ´DeleteVehicle´ commands. Try today while you are playing the match and post here, if all was working or not.
<BR>
<BR>When all is working, I go on with my scripting-marathon *gg* so that this will be a great mission.
<BR>
<BR>Greets
<BR>
<BR>Lobanak
Hello,
<BR>
<BR>ok, have tested CreateVehicle and this is working fine.
<BR>
<BR>But now, CreateUnit is not working. Don´t know why. Do someone have a code-snippet which is working and can give this to me?
<BR>
<BR>Thanks
<BR>
<BR>Lobanak
will search in my database
Hello,
<BR>
<BR>now I have the problem with ´createUnit´ resolved. You must have another unit, which is in a group (groupOne). Then create a script with the following:
<BR>"SoldierW" createUnit [getpos _marker, groupOne]
<BR>
<BR>Now the unit is created. This command ´needs´ a group and one unit in this group present in the game.
<BR>
<BR>Greets
<BR>
<BR>Lobanak