AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player model inside a giant ball model? (https://forums.alliedmods.net/showthread.php?t=221120)

wicked95 07-18-2013 07:18

Player model inside a giant ball model?
 
Is it possible?
And maybe the ball to spin when player moves too :)
Somethig like this http://static.guim.co.uk/sys-images/...lking--007.jpg (random chosen from google images)
I don't have the giant ball model but it shouldn't be hard to make if it's just a giant ball...
Or i'll have to combine the ball model with the player model to make one model?

K1d0x 07-18-2013 14:07

Re: Player model inside a giant ball model?
 
Quote:

Originally Posted by LordOfNothing (Post 1993866)
I dont now how , but its posibile you just need a simple plugin and a big models :))

You really don't know xD, first of all ball must be separate of Player body if aren't separated.... player can't walk in ball and the ball does not rotate

.Dare Devil. 07-18-2013 22:04

Re: Player model inside a giant ball model?
 
search how to create an entity.
then search what are velocity and angles.
Basically just seach, all things are already asked, you just have to find them.

Backstabnoob 07-19-2013 06:45

Re: Player model inside a giant ball model?
 
Just create a model connected to a bone of the player model and set it as MOVETYPE_FOLLOW.

_Pro_ 07-19-2013 07:43

Re: Player model inside a giant ball model?
 
You can make that model follow the player, seting the origin to the player to appear the player are inside of the ball, for this you should set SOLID_NOT To the ball entity. Sorry for my bad english, I speak spanish :C

Backstabnoob 07-19-2013 09:01

Re: Player model inside a giant ball model?
 
Quote:

Originally Posted by _Pro_ (Post 1994327)
You can make that model follow the player, seting the origin to the player to appear the player are inside of the ball, for this you should set SOLID_NOT To the ball entity. Sorry for my bad english, I speak spanish :C

No

wicked95 07-20-2013 03:21

Re: Player model inside a giant ball model?
 
Thank you all for the answers.
Quote:

Originally Posted by Backstabnoob (Post 1994298)
Just create a model connected to a bone of the player model and set it as MOVETYPE_FOLLOW.

This in a plugin? I've never written such a thing.

Can the ball be just somekind of glow without a model? I know with glow there's no way it's gona move but it's gona be easyer for me cuz i've never made a model before and i don't know if i can make it :D

Backstabnoob 07-20-2013 08:57

Re: Player model inside a giant ball model?
 
You can add a bone to the model and connect it to a different bone on the player model skeleton. Then, once you create the entity with the model and set its movetype and aiment like this:

Code:
set_pev( iEnt, pev_movetype, MOVETYPE_FOLLOW ) set_pev( iEnt, pev_aiment, id ) // where id is the index of player who should be inside the ball

the ball will be attached to the player, which unlike setting its origin on think, doesn't look laggy.

Check at how Hats do this. It's pretty easy to do, but you need to have basic 3ds max knowledge.

wicked95 07-20-2013 11:31

Re: Player model inside a giant ball model?
 
Something like this?

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
 
new gBall[33];
 
public 
plugin_init() {
register_plugin(" "" "" ");
RegisterHam(Ham_Spawn"id""player_spawn"1);
}
 
public 
plugin_precache() {
precache_model("models/GiantBall.mdl");
}
 
public 
player_spawn(id) {
if(!
is_user_alive(id))
{
return 
PLUGIN_HANDLED;
}
SetBall(id)
return 
PLUGIN_HANDLED;
}
 
public 
SetBall(id) {
gBall[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
set_pev(gBall[id], pev_movetypeMOVETYPE_FOLLOW)
set_pev(gBall[id], pev_aimentid)
set_pev(gBall[id], pev_rendermodekRenderNormal)
engfunc(EngFunc_SetModelgBall[id], "models/GiantBall.mdl")


It compiles well but i don't have the ball model to test it now.

Backstabnoob 07-21-2013 19:27

Re: Player model inside a giant ball model?
 
Should work, but don't forget to kill the entity upon player death.


All times are GMT -4. The time now is 06:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.