General > Developers Corner

Customized Balls

(1/1)

WispySkies:
Hai, hasn't been a while since I posted help or asked for help, so here ye go ^-^

I have hit an unfortunate bump in my code right now and since it's not ULX related I've put it in off-topic. (And cause I know you guys are smart and are possibly able to help!) Is there an easy way for me to be able to spawn a ball (With a swep I have made), upon secondary fire (right click) it cycles through a few colours (which would be printed in chat of the colour thats being set), and when reloading it changes the size in chunks of 16. (Maybe 8, GMod base ball code size is 4-128 [pixels?]) And a surprise command that changes the gravity the ball has. (I can code this, I just need to get pointed in the colour changing/size changing/spawning direction.)

All thanks given now, and I appreciate the help if you tackle this :)

roastchicken:
These wiki pages should get you going in the right direction:

ents.Create

Entity:SetColor

Entity:SetModelScale

I suggest that in the future you also post questions in the Facepunch Garry's Mod Development Problems That Don't Need Their Own Thread. Not that people here are any worse than those on Facepunch (this forum usually seems to be nicer), it's just that Facepunch has many more users and thus you are more likely to get an answer faster.

(if any mods have an issue with me promoting a FP thread, feel free to ask me to/just remove it)

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version