Post: Coding poblems
01-24-2011, 12:47 AM #1
stevesixotwo
Is Godlike
(adsbygoogle = window.adsbygoogle || []).push({}); I've recently been developing a new game mode that has required a care package structure that is somewhat tall. I have created stairs to the top of the structure but I'm not happy with how choppy the stairs are. I'm very interested in the ramp that GodlyModz used in his garage mod but I'm having trouble recreating it. I'm not an idiot and I know how forums work I have searched and searched for my answer with no luck. If anyone could help me or point in the right direction I would appreciate it. Thanks
(adsbygoogle = window.adsbygoogle || []).push({});
01-24-2011, 01:09 AM #2
DEREKTROTTER
You're Goddamn Right
    
CreateRamps(top, bottom)//top coordinate to bottom coordinate
{
D = Distance(top, bottom);
blocks = roundUp(D/30);
CX = top[0] - bottom[0];
CY = top[1] - bottom[1];
CZ = top[2] - bottom[2];
XA = CX/blocks;
YA = CY/blocks;
ZA = CZ/blocks;
CXY = Distance((top[0], top[1], 0), (bottom[0], bottom[1], 0));
Temp = VectorToAngles(top - bottom);
BA = (Temp[2], Temp[1] + 90, Temp[0]);
for(b = 0; b < blocks; b++){
block = spawn("script_model", (bottom + ((XA, YA, ZA) * B)));
block setModel("com_plasticcase_friendly");
block.angles = BA;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}
block = spawn("script_model", (bottom + ((XA, YA, ZA) * blocks) - (0, 0, 5)));
block setModel("com_plasticcase_friendly");
block.angles = (BA[0], BA[1], 0);
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}


e.g

    CreateRamps((-3285, 3190, 1125), (-3285, 3353, 1030));

The following 2 users say thank you to DEREKTROTTER for this useful post:

maxrox, stevesixotwo
01-24-2011, 01:43 AM #3
Originally posted by DEREKTROTTER View Post
    
CreateRamps(top, bottom)//top coordinate to bottom coordinate
{
D = Distance(top, bottom);
blocks = roundUp(D/30);
CX = top[0] - bottom[0];
CY = top[1] - bottom[1];
CZ = top[2] - bottom[2];
XA = CX/blocks;
YA = CY/blocks;
ZA = CZ/blocks;
CXY = Distance((top[0], top[1], 0), (bottom[0], bottom[1], 0));
Temp = VectorToAngles(top - bottom);
BA = (Temp[2], Temp[1] + 90, Temp[0]);
for(b = 0; b < blocks; b++){
block = spawn("script_model", (bottom + ((XA, YA, ZA) * B)));
block setModel("com_plasticcase_friendly");
block.angles = BA;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}
block = spawn("script_model", (bottom + ((XA, YA, ZA) * blocks) - (0, 0, 5)));
block setModel("com_plasticcase_friendly");
block.angles = (BA[0], BA[1], 0);
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}


e.g

    CreateRamps((-3285, 3190, 1125), (-3285, 3353, 1030));

Heyy Derek, I was wondering if you can tell me why every time i do that i get bad syntax or unknown function i put it under host menu
01-25-2011, 12:39 AM #4
-Whiteboy-
┌∩┐ (◣◢Winky Winky┌∩┐
hey Derek how would you find out the position to put for the ramps?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo