OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LCD on 26 Mar 2009, 13:25:14

Title: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: LCD on 26 Mar 2009, 13:25:14
so heres my problem (if it wasnt clear from the title...) have any1 discovered a way to load bodies on a truck ? cuz i wanna make a truck (open one) to b loaded with nice fresh bodies... so we can cook something tonight... but the bodies keep falling off... any chanse to do it without a crazy repeating loop with setposes and getposes ?

LCD OUT
Title: Re: help me im a n00b (30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: schuler on 26 Mar 2009, 13:38:55
i wounder if placing pallets on the truck with, 
Code: [Select]
this setPos [getPos this select 0, getPos this select 1, 3] would work, then set the body's on the pallets,?!?!?,, I'll be over for dinner :D
Title: Re: help me im a n00b (30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: LCD on 26 Mar 2009, 13:55:15
it works... it works now i can deliver them to mom :D

after its ready ill call u schu... but u bring the alcohol with u...

LCD OUT

[edit]
ok as im continueing with my quest of making diner for me, my family and schuler... ive hit another problem(s)....

1st thing... the next code would work from an init line

Code: [Select]
nil = [deadguy,pallet1,[0.6,0,0.1],90,2000] execVM "inGameIntro\keepOnTruck.sqf"
but whenever i put it (the same... using a ctrl-c ctrl-v method) in a triger it wont work... ?

also while hte pallet does looks good and smooth on the truck while its moving (the truck i meen) the soldier tends to b ery shaky and jumps up and down (so he keeps moing... which is bad...)

Title: Re: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: Spooner on 26 Mar 2009, 21:27:47
I know I advocated it for a while to throw away script handles (without thinking), but nil = will redefine the whole game's nil! Constants? Nah, too much trouble to implement! Use nul= which is at least safe until that command gets added (perhaps LCD_null =)?

You probably have to setpos the man over the pallet, which rather defeats the object of using the pallet. Remember to always setPos inside a waitUntil loop though, since while {true} do { sleep 0.01 } won't be perfectly in sync with the graphics frames.
Title: Re: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: LCD on 26 Mar 2009, 22:37:51
ok while im trying to get me and my family (and schu) a diner i continue enountering problems...  :weeping:

the soldier is still jumping up and down een when im using a waituntill loop with 0.01 sleep... also it seems that if my truck changes direction the relative place of the soldier to the truck get fubared (im guessing some sin cosin and other not realy fancy maths got stop that... but i didnt touch any math in a year and so and im lazy  :cool2:  :D)

also it seems that whenever i try to execute the function i wrote more than 1ce thro a triger (it wud work thro an init line) it wud go wrong and gie me an error line stating
Quote
priate #["_obj","etc"]   missing ;
ny1 knows how can i sovle that ?

LCD OUT
Title: Re: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: Sparticus76 on 27 Mar 2009, 02:56:44
yes,

change

Code: [Select]
priate ["_obj","etc"]
into

Code: [Select]
private ["_obj","etc"];
Title: Re: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: LCD on 27 Mar 2009, 08:26:52
ive got it as private (it does work from init line... i just rote it from my mind here and my keyboard is fucked up....(the V effect)... nyways thats not the problem...

LCD OUT
Title: Re: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: Sparticus76 on 28 Mar 2009, 00:21:36
In your quote you were missing the ; after the ] aswell as the typo.
Title: Re: [new prob](30 dead men on a URAL truck... ho ho ho and a bottle of rum)
Post by: LCD on 28 Mar 2009, 00:26:51
porra caralho... i was saying the script wud work when its done from init line or just 1 time from the triger... but wont work on the second time... so its not a typo in the function... anyways im adding the function here...

LCD OUT