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

How do I do things with Entities?


Post New Thread Reply   
 
Thread Tools Display Modes
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-24-2005 , 04:55  
Reply With Quote #11

You're moving huh? Man it must be tiring to pack all your stuff and go.... Cause i get tired like that. Where are you moving to anyways?

OnTopic: Well if no one can find the SV_movestep() function does anyone know any function that CAN set the movetype?

BTW: Thanks for posting those constants. Now i don't have to go back and forth in the engine_const include =D. At least when it comes to strings.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-24-2005 , 05:01  
Reply With Quote #12

moving to Louisiana.

what is sv_movestep? to set entities movetype u need to do entity_set_init(iEnt, EV_INT_movetype, #);
Freecode is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-24-2005 , 05:07  
Reply With Quote #13

In case you were wondering where i got SV_movestep() from it was in the VexdUM_Const Include, specifically in these few lines of code.

Code:
// Changes the SV_Movestep() behavior to not need to be on ground
#define	FL_FLY			(1<<0)

// Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
#define	FL_SWIM			(1<<1)

#define	FL_CONVEYOR		(1<<2)
#define	FL_CLIENT		(1<<3)
#define	FL_INWATER		(1<<4)
#define	FL_MONSTER		(1<<5)
#define	FL_GODMODE		(1<<6)
#define	FL_NOTARGET		(1<<7)

// Don't send entity to local host, it's predicting this entity itself
#define	FL_SKIPLOCALHOST	(1<<8)

// At rest / on the ground
#define	FL_ONGROUND		(1<<9)

// not all corners are valid
#define	FL_PARTIALGROUND	(1<<10)

// player jumping out of water
#define	FL_WATERJUMP		(1<<11)

// Player is frozen for 3rd person camera
#define FL_FROZEN		(1<<12)

// JAC: fake client, simulated server side; don't send network messages to them
#define FL_FAKECLIENT		(1<<13)

// Player flag -- Player is fully crouched
#define FL_DUCKING		(1<<14)

// Apply floating force to this entity when in water
#define FL_FLOAT		(1<<15)

// worldgraph has this ent listed as something that blocks a connection
#define FL_GRAPHED		(1<<16)

#define FL_IMMUNE_WATER		(1<<17)
#define	FL_IMMUNE_SLIME		(1<<18)
#define FL_IMMUNE_LAVA		(1<<19)

// This is a spectator proxy
#define FL_PROXY		(1<<20)

// Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
#define FL_ALWAYSTHINK		(1<<21)

// Base velocity has been applied this frame (used to convert base velocity into momentum)
#define FL_BASEVELOCITY		(1<<22)

// Only collide in with monsters who have FL_MONSTERCLIP set
#define FL_MONSTERCLIP		(1<<23)

// Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
#define FL_ONTRAIN		(1<<24)

// Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
#define FL_WORLDBRUSH		(1<<25)

// This client is a spectator, don't run touch functions, etc.
#define FL_SPECTATOR           	(1<<26)

// This is a custom entity
#define FL_CUSTOMENTITY		(1<<29)

// This entity is marked for death -- This allows the engine to kill ents at the appropriate time
#define FL_KILLME		(1<<30)

// Entity is dormant, no updates to client
#define FL_DORMANT		(1<<31)

// no interaction with other objects
#define	SOLID_NOT		0

// touch on edge, but not blocking
#define	SOLID_TRIGGER		1

// touch on edge, block
#define	SOLID_BBOX		2

// touch on edge, but not an onground
#define	SOLID_SLIDEBOX		3

// bsp clip, touch on edge, block
#define	SOLID_BSP		4

// never moves
#define	MOVETYPE_NONE		0

#define MOVETYPE_ANGLENOCLIP	1
#define MOVETYPE_ANGLECLIP	2

// Player only - moving on the ground
#define	MOVETYPE_WALK		3

// gravity, special edge handling -- monsters use this
#define	MOVETYPE_STEP		4

// No gravity, but still collides with stuff
#define	MOVETYPE_FLY		5

// gravity/collisions
#define	MOVETYPE_TOSS		6

// no clip to world, push and crush
#define	MOVETYPE_PUSH		7

// No gravity, no collisions, still do velocity/avelocity
#define	MOVETYPE_NOCLIP		8

// extra size to monsters
#define	MOVETYPE_FLYMISSILE	9

// Just like Toss, but reflect velocity when contacting surfaces
#define	MOVETYPE_BOUNCE		10

// bounce w/o gravity
#define MOVETYPE_BOUNCEMISSILE	11

// track movement of aiment
#define MOVETYPE_FOLLOW		12

// BSP model that needs physics/world collisions (uses nearest hull for world collision)
#define	MOVETYPE_PUSHSTEP	13
And thanks again freecode, man you must really know your stuff, do you like remember what EVERY functions in every include does? If so thats pretty cool, and I wish i could do that so I don't always have to search through the includes.

P.S. Have a safe trip to Louisiana, and hopefully you will enjoy living there too
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-24-2005 , 05:14  
Reply With Quote #14

thats an engine function.
So if u want to set FL_FLY u will need to set entities init using EV_INT_flags
Freecode is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-24-2005 , 05:32  
Reply With Quote #15

Oh yeah, thanks for pointing that out freecode cause i now see the exact same thing in the engine_const include. I will post the EV_INT types up just in case anyone else is working on making an entity This is what you replace iKey with when you use this function: set_entity_int(iIndex, iKey, iVal). Now the constants below can be used for a variety of things, such as making an entity move, making weapon animations, like when right when you change or get the weapon, or reloading, etc. Basically, if you want to do like ALMOST ANYTHING to an entity you'd use these constants.

Code:
/* Int */
enum {
	EV_INT_gamestate = 0,
	EV_INT_oldbuttons,
	EV_INT_groupinfo,
	EV_INT_iuser1,
	EV_INT_iuser2,
	EV_INT_iuser3,
	EV_INT_iuser4,
	EV_INT_weaponanim,
	EV_INT_pushmsec,
	EV_INT_bInDuck,
	EV_INT_flTimeStepSound,
	EV_INT_flSwimTime,
	EV_INT_flDuckTime,
	EV_INT_iStepLeft,
	EV_INT_movetype,
	EV_INT_solid,
	EV_INT_skin,
	EV_INT_body,
	EV_INT_effects,
	EV_INT_light_level,
	EV_INT_sequence,
	EV_INT_gaitsequence,
	EV_INT_modelindex,
	EV_INT_playerclass,
	EV_INT_waterlevel,
	EV_INT_watertype,
	EV_INT_spawnflags,
	EV_INT_flags,
	EV_INT_colormap,
	EV_INT_team,
	EV_INT_fixangle,
	EV_INT_weapons,
	EV_INT_rendermode,
	EV_INT_renderfx,
	EV_INT_button,
	EV_INT_impulse,
	EV_INT_deadflag,
}
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-24-2005 , 05:35  
Reply With Quote #16

ok make sure u dont confuse EV_INT_movetype and EV_INT_flags
FL_* = flags
MOVETYPE_* =
Freecode is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-24-2005 , 05:42  
Reply With Quote #17

Well since this is the second page, I'll just post the code up for the movetype one more time for those of you who didn't see it on the first page, and relax it's not long this is the compressed version =D. And remember I'm posting this up for people who are having trouble making an entity to move and all, like me lol.

Code:
#define	MOVETYPE_NONE		0		/* never moves */
#define MOVETYPE_ANGLENOCLIP	1
#define MOVETYPE_ANGLECLIP	2
#define	MOVETYPE_WALK		3		/* Player only - moving on the ground */
#define	MOVETYPE_STEP		4		/* gravity, special edge handling -- monsters use this */
#define	MOVETYPE_FLY		5		/* No gravity, but still collides with stuff */
#define	MOVETYPE_TOSS		6		/* gravity/collisions */
#define	MOVETYPE_PUSH		7		/* no clip to world, push and crush */
#define	MOVETYPE_NOCLIP		8		/* No gravity, no collisions, still do velocity/avelocity */
#define	MOVETYPE_FLYMISSILE	9		/* extra size to monsters */
#define	MOVETYPE_BOUNCE		10		/* Just like Toss, but reflect velocity when contacting surfaces */
#define MOVETYPE_BOUNCEMISSILE	11		/* bounce w/o gravity */
#define MOVETYPE_FOLLOW		12		/* track movement of aiment */
#define	MOVETYPE_PUSHSTEP	13		/* BSP model that needs physics/world collisions (uses nearest hull for world collision) */
Okay now to make an entity follow wherever your crosshair fire is, that would be MOVETYPE_FOLLOW right?
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-24-2005 , 11:14  
Reply With Quote #18

this is where yo need to do alot of testing.
i dont noe what all of those movetypes will do. If you want an entity follow your aim then u might just set entities viewing angles to be the same as yours.
Freecode is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-24-2005 , 18:56  
Reply With Quote #19

Alright, now what function would tell me if an entity came in contact with another entity, such as a wall, box or player?
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-24-2005 , 19:13  
Reply With Quote #20

pfn_touch(ptr,ptd)
Freecode is offline
Reply


Thread Tools
Display Modes

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 01:09.


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