AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Finding BSP monster spawn origin (https://forums.alliedmods.net/showthread.php?t=205578)

4554 01-12-2013 06:40

[SOLVED] Finding BSP monster spawn origin
 
There is a .map file
Code:

{
"TriggerCondition" "4"
"TriggerTarget" "monstercounter"
"classname" "monster_zombie"
"angle" "240"
"TriggerCondition" "0"
"targetname" "bubbles"
"origin" "1108 -1474 64"
}

does anybody knows to find this monster's origin(from cs) by amxx/metamod?

Arkshine 01-12-2013 06:43

Re: Finding BSP monster spawn origin
 
Parse the file or hook keyvalue forward when map is loading.

4554 01-12-2013 06:44

Re: Finding BSP monster spawn origin
 
Quote:

Originally Posted by Arkshine (Post 1872004)
Parse the file or hook keyvalue forward when map is loading.

Sorry for my foolish amxx knowledge, can u give a amxx sample plugin for getting monster_zombie?

bibu 01-12-2013 06:52

Re: Finding BSP monster spawn origin
 
Maybe this can help you:

http://forums.alliedmods.net/showthread.php?t=155527

4554 01-13-2013 02:57

Re: Finding BSP monster spawn origin
 
Code:

public fm_keyvalue(entid)
{
        if (pev_valid(entid))
        {
                new classname[32]
                pev(entid, pev_classname, classname, 31)

                if(equal(classname, "monster_zombie"))
                        server_print("entity %s", classname)
        }
}

It doesn't work, i cant find anything about monster_zombie

Schwabba2 01-13-2013 05:58

Re: Finding BSP monster spawn origin
 
I don't think server_print will work in pfn_keyvalue, try log_to_file.

Arkshine 01-13-2013 06:02

Re: Finding BSP monster spawn origin
 
use pfn_keyvalue forward (engine) , not the one from fakemeta.

4554 01-13-2013 06:24

Re: Finding BSP monster spawn origin
 
Code:

#include <amxmodx>
#include <engine>

public pfn_keyvalue(entid)
{
        if (is_valid_ent(entid))
        {
                static szClass[32]
                entity_get_string(entid, EV_SZ_classname, szClass, 31)

                //if(equal(classname, "monster_zombie"))
                //server_print("entity %s", classname)
                log_to_file("test2.log", "entity %s", szClass)
        }
}

Same, maybe monster_zombie not a valid ent for cs?
I have just found monster_scientist.

bibu 01-13-2013 06:51

Re: Finding BSP monster spawn origin
 
Yes probably. So you would need to get all its properties spawn everything again. I remember last time that I couldn't solve it though.

fysiks 01-13-2013 15:12

Re: Finding BSP monster spawn origin
 
Quote:

Originally Posted by Schwabba2 (Post 1872671)
I don't think server_print will work in pfn_keyvalue, try log_to_file.

No. server_print() will work at any time. You may miss it in the server console because of other stuff that is output but it still works.


All times are GMT -4. The time now is 13:39.

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