AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Info_player_deathmatch and Info_player_start (https://forums.alliedmods.net/showthread.php?t=5673)

Votorx 09-08-2004 21:56

Info_player_deathmatch and Info_player_start
 
Alright correct me if I'm wrong but these are the 2 points in which CT players spawn and T players spawn right? I'm using the ent_set_vector to set the origin so the Terrorists and CTs will spawn together, but its not working. They are still spawning in their original spot. And when I get the origin of the 2 ents they equal each other. Why are the players still spawning in the same spot? Should I use DispatchKeyValue() instead? Why would that make a difference?

twistedeuphoria 09-08-2004 22:17

info_player_start is CT and info_player_deathmatch is T. hope that helps a bit.

johnjg75 09-08-2004 22:27

i think he knew that :|

twistedeuphoria 09-08-2004 22:29

he said correct me if i'm wrong so i was just syain that he isnt wrong

Ingram 09-08-2004 23:01

try entity_set_origin

Votorx 09-09-2004 00:15

The origins of these ents are over 1 Billion for y and z. Is this right? And there's around 16 of each coming out to 32 different ents. Lol and each of the ents, if they have the same class name, equal each other, origin wise.

mahnsawce 09-09-2004 00:38

Can you paste how exactly you're getting the origins?

Johnny got his gun 09-09-2004 04:59

CS caches a couple entities when map loads and doesn't read any more data from these entities themselves - it just looks at what it has in cache - all this because of Valve's infamous caching optimization of last winter. I'm not sure if the spawn points are cached, but if they are, you're maybe out of luck. In other cases this really should work, or at least used to. If all you want to do is change where people spawn there should be a couple other ways around this. Here's just an idea: use fakemeta (surprise!) to hook the pfn_spawn function, possibly the post one, and in the forward you just set the player's origin to wherever you want.

BTW maybe you aren't retrieving the origins as float.

Votorx 09-09-2004 08:18

I'm running it through a for loop with a few ifs to exit out of the loop once an invalid ent with the classnames are found. I'm using engine_get_vector to retrieve their origins and storing them into arrays which I print out later on to see exactly what their origins are. I would use get_keyvalue but seeing as it has a bug I guess I'll have to wait untill TP5.

Quote:

Here's just an idea: use fakemeta (surprise!) to hook the pfn_spawn function, possibly the post one, and in the forward you just set the player's origin to wherever you want.
How would I go about hooking pfn_spawn function?

P.S - If needed I'll post the exact code when I get the chance.

BAILOPAN 09-09-2004 09:36

CSDM sets new spawn origins, it's not too hard to do.

Make sure you use entity_set_origin instead of entity_set_vector.

CSDM 1

CSDM 2


All times are GMT -4. The time now is 17:23.

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