
KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 28, 2009 11:56 AM
Msg. 1 of 4
Hi all. those who have the success of getting the pelican pickup script maker to actually comple and what not and work usually have the clipping (aka lagging) of the vehicle when it is flying. well, here's the problem in the script:
(script continuous Attach_hogs_spelican (begin (sleep_until (> spelican_has_hog_number -1) 11) (begin (if (= spelican_has_hog_number 1) (begin (sleep 1) (objects_attach spelican "cargo" ext_a_jeep "") (unit_enter_vehicle ext_a_jeep spelican "cargo" ); (objects_detach spelican ext_a_jeep ) ) ) (if (= spelican_has_hog_number 2) (begin (sleep 1) (objects_attach spelican "cargo" ext_a_tank "") (unit_enter_vehicle ext_a_tank spelican "cargo" ); (objects_detach spelican ext_a_tank ) ) ) ) ) )
(script continuous Detach_hogs_spelican (begin (sleep_until (= (unit_get_current_flashlight_state spelican) true) 33) (set spelican_has_hog_number -1) (unit_set_desired_flashlight_state spelican false) (unit_exit_vehicle ext_a_jeep ); (objects_detach spelican ext_a_jeep ) (unit_exit_vehicle ext_a_tank ); (objects_detach spelican ext_a_tank )
) )
the red is where the pickup script maker places the part where the vehicle is detached form the pelican. but, this is in the area of the script where it is being ATTACHED!!! WTF?! but anyway, this causes a continuous cycle of attaching, and detaching of the vehicle to the pelican, and causing such lag.
the green is where the detach lines SHOULD be when the vehicle is ONLY being detached! this should solve the problem! now,the vehicle should STAY where it is, having the same graphical eye candy as it does in SINGLE PLAYER!
THIS IS NOT THE FULL SCRIPT (to those of you who didn't know) Edited by KouRyuu on Jul 28, 2009 at 11:57 AM
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Jul 29, 2009 01:51 AM
Msg. 2 of 4
The detach is there for a very good reason.
When objects are attached to another object with 'objects_attach', any players that aren't the server see the object disappear. Only the host can see the object attached to the other object.
In this case, that means most players that pick up a vehicle in the peli will only see it disappear rather than appear attached, which looks bad.
So, the solution was to repeatedly detach and reattach the vehicle to the peli. The fact that it gets detached and then sleeps 1 tick gives the server the chance to send its information to the players so that they can see it. Yet, it gets reattached right after sleeping 1 tick, so overall it stays attached.
However, this is useless in SP since there aren't any network issues to worry about, so the change to the script that you made is ideal for SP.
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Aug 2, 2009 01:27 PM
Msg. 3 of 4
true. i edit sp maps for my own use... and for mp maps i just add ai. yes! you caught me red-handed :P
but.... i wish there was a different way to do this sort of thing... i guess not, but idk..
|
|
|

Koo294
Joined: Nov 30, 2008
How is she when she doesn't surf?
|
Posted: Aug 2, 2009 02:59 PM
Msg. 4 of 4
there is a sort of way which im using for my latest map, but that comes later
:)
|
|
|
| |
|
|
 |
|