UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Setting vehicletype on script_vehicle causes game to crash on load

broken avatar :(
Created 8 years ago
by Koan
0 Members and 1 Guest are viewing this topic.
1,338 views
broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 5 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
Signature
⠀⠀⠀⣴⣴⡤
⠀⣠⠀⢿⠇⡇⠀⠀⠀⠀⠀⠀⠀⢰⢷⡗
⠀⢶⢽⠿⣗⠀⠀⠀⠀⠀⠀⠀⠀⣼⡧⠂⠀⠀⣼⣷⡆
⠀⠀⣾⢶⠐⣱⠀⠀⠀⠀⠀⣤⣜⣻⣧⣲⣦⠤⣧⣿⠶
⠀⢀⣿⣿⣇⠀⠀⠀⠀⠀⠀⠛⠿⣿⣿⣷⣤⣄⡹⣿⣷
⠀⢸⣿⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿
⠀⠿⠃⠈⠿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠿⠿⠿

⠀⢀⢀⡀⠀⢀⣤⠀⠀⠀⠀⠀⠀⠀⡀⡀
⠀⣿⡟⡇⠀⠭⡋⠅⠀⠀⠀⠀⠀⢰⣟⢿
⠀⣹⡌⠀⠀⣨⣾⣷⣄⠀⠀⠀⠀⢈⠔⠌
⠰⣷⣿⡀⢐⢿⣿⣿⢻⠀⠀⠀⢠⣿⡿⡤⣴⠄⢀⣀⡀
⠘⣿⣿⠂⠈⢸⣿⣿⣸⠀⠀⠀⢘⣿⣿⣀⡠⣠⣺⣿⣷
⠀⣿⣿⡆⠀⢸⣿⣿⣾⡇⠀⣿⣿⣿⣿⣿⣗⣻⡻⠿⠁
⠀⣿⣿⡇⠀⢸⣿⣿⡇⠀⠀⠉⠉⠉⠉⠉⠉⠁
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
Koan's Contact & Social Linksh-r_Koan_my website
I'm trying to get projectiles to launch out of a volcano and into the playable area.

So far I've tried doing this in two different ways: following UGX's Airstrike tutorial, and using code from BO2 Nuketown's method of having random perks come from the sky. In UGX's airstrike tutorial, it instructs me to set vehicletype to "corsair". This caused the game to crash upon loading:


Other vehicletypes cause it to crash too.
When I remove the vehicletype KVP, the game throws an error:


When I remove the script_vehicle and all related ents from the map completely, the game loads fine.

Originally I had a bunch of script_origin ents linked to each other and had the projectile MoveTo() each node, but it looked ugly as fuck because it moved to each node in a straight line, and paused for a split-second before moving to the next node, so just looked horrible.


Double Post Merge: July 12, 2016, 08:13:52 am
Codmoddd1234 has fixed this issue, he sent me a couple of things via PM. I asked him if I could post the code here in case others have the same issue:

Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_vehicle;
#include maps\_anim;

#using_animtree("generic_human");


setupvehicles_preload()
{
build_acustom_vehicle( "rubber_raft" );
}

build_acustom_vehicle( type )
{
model = undefined;
death_model = undefined;
death_fx = "explosions/large_vehicle_explosion";
death_sound = "explo_metal_rand";
health = 1234;
min_health = 1233;
max_health = 1235;
team = "axis";
turretType = undefined;
turretModel = undefined;
func = ::blankpointerfunction;  //vehicle.gsc needs this for nothing

if( type == "rubber_raft" )
{
model = "makin_raft_rubber";  //boat steers different than jeep
death_fx = undefined;
death_model = "makin_raft_rubber";
health = 1234;
min_health = 1233;
max_health = 1235;
team = "allies";
func = ::blankpointerfunction; //vehicle.gsc needs this for nothing
}

maps\_vehicle::build_template( type, model );
maps\_vehicle::build_life( health, min_health, max_health );
maps\_vehicle::build_treadfx();
maps\_vehicle::build_team( team );
maps\_vehicle::build_localinit( func ); 
}

blankpointerfunction()
{
}

Code Snippet
Plaintext
// Base script (boat loops around)
// For building on in future

main()
{
veh = getent("launch_test", "targetname");
start_vehnode = getvehiclenode( veh.target, "targetname" );

while (1)
{
veh attachPath( start_vehnode );
veh StartPath();
veh waittill("reached_end_node");
}

wait 5;
veh setmodel( "woodthrone" ); // PLACEHOLDER MODEL
}

Added to mapname_patch.csv: rawfile,vehicles/rubber_raft
then put maps\setupvehicles::setupvehicles_preload(); before maps\_zombiemode::main();

I'll probably make a tut/download later on for this, too.


edit: tut here http://ugx-mods.com/forum/index.php/topic,11894.0.html
Last Edit: July 14, 2016, 12:26:00 am by Koan

 
Loading ...