Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Off the top of my head, I would have liked to have seen some Director hooks along the lines of EnvEntityMaker
OnSpawnSpecial(type, props)
OnSpawnCommon(props)
Both could modify the table of parameters. So you could transmute the type (like ConvertZombieClass) but also change any of the entity properties such as health, speed, model or skin. Returning null would cancel the spawn. I know some of this is do-able in the new mutation system but I don't know if it works in non-mutation modes.
I don't know if you can actually modify individual commons as I know they are somewhat of a collective entity but as an example
DirectorOptions -> {
function OnSpawnCommon(props){
// vary common speed and health
props[health] = props[health] + RandomInt(-10,10)
props[zspeed] = props[zspeed] + RandomInt(-10,10) // I just made up zspeed but I digress..
return props
}
function OnSpawnSpecial(etype, props){
TankMdls <- [
["models\infected\hulk.mdl", 0 ],
["models\infected\super_tank.mdl",2000]
];
if (etype == ZOMBLIE_TANK){
// spawn a tank or super tank
local tanktype = RandomInt(0,1);
props[health] = props[health]+ TankMdls[tanktype][1];
props[model] = props[health]+ TankMdls[tanktype][0];
}
return props
}
}
ex: spawn_at <- GetSpawnPosition(SPAWN_IN_FRONT_OF_SURVIVORS, 1000); // returns null if it fails
Maybe a way of ascertaining flow relative to survivors for any given entity as well, Something like...
So for instance , say you wanted to randomly spawn things behind doors, you could loop through the prop_door_rotatings, collect the ones further in flow (IsAheadInFlow) then use GetSpawnPositionFron on the door to make sure you spawn behind it, Of course it would be helpful to know if the door was open, unlocked etc.
Also, the code from the previous post in code tags. I guess I should have read the formatting help. Too bad we can't preview posts
The other way around seems to have the methods __KeyValueFromInt(key,int), etc., but do those work with any arbitrary keyvalue?
On another note, can ConvertZombieClass() just always work?
I may be missing something, but trying to do something "somewhat" along the lines of Tankkk in coop and the only part I'm having a problem with is what I would think should be the simplest, spawning tanks.
Since ZSpawn doesn't raycast and we don't yet have something like GetSpawnPosition, I'm stumped. Since the spawns are totally dependent on gameplay even hardcoding them to a map really won't work well.
Also on my previous suggestion, IsAheadInFlow(vec), kind of silly would make much more sense to just have a function that returned the flow distance and using it's sign.
As far as making a player IT, you can mimic that somewhat with CommandABot, commons may still choose other targets on their path. but I think that happens with being IT too. I'm assuming being IT has a lot of other side effects as far as spawing
Damn, that CommandABot command is bloody powerful! :)
player.IsDead()
From Portal2
int CBaseEntity::entindex()
Maybe functions for SetParent SetParentAttachment, but you can work around those with DoEntFire
Also would be nice to be able to play non-game sounds on an entity.
Setting nexthink on an entity
I don't know if it's possible on an individual basis. 10fps for trying to manually animate something is very choppy. And many things don't need to think very often at all.
I know in Portal2 you can bump up the limit for all.
What if you returned a true or false value for NextThink, to determine whether the bot continues with the default think process? :/