Raised This Month: $51 Target: $400
 12% 

Not a plugin. hl2dm mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ErUs
Junior Member
Join Date: Jun 2004
Old 03-08-2005 , 10:52   Not a plugin. hl2dm mod
Reply With Quote #1

im trying to creat a ball type entity.
so far i have:
Code:
#include "cbase.h"

class CBallEntity : public CBaseAnimating
{
public:
	DECLARE_CLASS( CBallEntity, CBaseAnimating );
	DECLARE_DATADESC();

	void Spawn( void );
	void Precache( void );
};

LINK_ENTITY_TO_CLASS( info_ballentity, CBallEntity );

// Start of our data description for the class
BEGIN_DATADESC( CBallEntity )
END_DATADESC()

// Name of our entity's model
#define	ENTITY_MODEL	"models/roller.mdl"

//-----------------------------------------------------------------------------
// Purpose: Precache assets used by the entity
//-----------------------------------------------------------------------------
void CBallEntity::Precache( void )
{
	PrecacheModel( ENTITY_MODEL );
}

//-----------------------------------------------------------------------------
// Purpose: Sets up the entity's initial state
//-----------------------------------------------------------------------------
void CBallEntity::Spawn( void )
{

	BaseClass::Spawn();

	Precache();

    SetModel( ENTITY_MODEL );

	SetSolid( SOLID_VPHYSICS );
	
	SetMoveType( MOVETYPE_VPHYSICS );	

	SetNextThink( gpGlobals->curtime + 0.1f );

}
my ball is created but it doesnt move. i can left click with my grav gun. i see the weird ray thing but it has no effect on the ball

plz help
ErUs is offline
manorastroman
Senior Member
Join Date: Oct 2004
Old 03-08-2005 , 13:56  
Reply With Quote #2

i think it needs the func_physics entity attached to it (From a mappers point of view)
__________________
manorastroman is offline
Send a message via AIM to manorastroman Send a message via MSN to manorastroman Send a message via Skype™ to manorastroman
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:50.


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