Raised This Month: $344 Target: $400
 86%   Almost there!

Help with function PostSpawn for point_template


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spacepoi
New Member
Join Date: Feb 2019
Old 02-12-2019 , 09:29   Help with function PostSpawn for point_template
Reply With Quote #1

I write vscript with squirrel for csgo.
I want to use this function without flag, "Preserve entity names".
I write script but it dont work.
I think "Entities.FindByName(null,"path1")" on the second line is not appropriate.
I only can find example on
https://developer.valvesoftware.com/...CPointTemplate
How to fix this?
Thanks in advance.

=============================
tbl <- {
path1 = Entities.FindByName(null,"path1"),
path2 = Entities.FindByName(null,"path2")
}

function PostSpawn( tbl )
{
foreach( name, handle in tbl )
{
printl( name + ": " + handle )
}
}
spacepoi is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 02-13-2019 , 11:40   Re: Help with function PostSpawn for point_template
Reply With Quote #2

Quote:
Originally Posted by spacepoi View Post
I want to use this function without flag, "Preserve entity names".
You want to use without that flag or u are already using without that flag?? Cause that can be edited through hammer editor and vscript not needed or i dont understand smthng.



Maybe you forget this:
Code:
 Note:	PostSpawn() will not be called unless the PreSpawnInstance() function is also defined in the script.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 02-13-2019 at 11:40.
Ghosted is offline
spacepoi
New Member
Join Date: Feb 2019
Old 02-15-2019 , 09:49   Re: Help with function PostSpawn for point_template
Reply With Quote #3

Thanks for replying.
I miss it. I will try that!
spacepoi is offline
spacepoi
New Member
Join Date: Feb 2019
Old 02-19-2019 , 10:56   Re: Help with function PostSpawn for point_template
Reply With Quote #4

There is little about this hook, so I post as far as I found.
I write script below, and use it without flag.
It work like this.

path1: ([0] path_track: path1&0012)
path2: ([0] path_track: path2&0012)
train7: ([95] func_tracktrain: train7)

This hook makes new table with handle labeled by name regard with all entity on point_template.
The name of table is not related.


================
function PreSpawnInstance( test,test )

function PostSpawn( tbl )
{
foreach( name, handle in tbl )
{
printl( name + ": " + handle )
}
}

Last edited by spacepoi; 02-19-2019 at 11:00.
spacepoi 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 12:48.


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