View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-13-2021 , 21:09   Re: Set player view to specified trigger_camera ent?
Reply With Quote #10

Quote:
Originally Posted by redivcram View Post
This solved my case, but does not solve the issue behind attaching view to a generic entity. This is limited to trigger_camera, but at least it does what I want it to.

PHP Code:
ExecuteHam(Ham_Usecamera_entplayer_idplayer_id11.0); 
Btw... does anyone know what the sixth param of this means?

EngFunc_SetView is for player views. The USE_TYPE float is when func_tracktrain is used for instance, it is the intensity. 0.1 is slow. 1.0 is normal start speed. 3.0 is full speed. Negative float is reverse on the train or same as pressing +backward. Use_type 0, is OFF. 1 is ON. 2 is USE with float added, with incrementing speed each activation until full speed is reached. 3 is TOGGLE ignoring float. So train would be full speed start and stop.

#define TOGGLE 3 would work nicer for cam in some cases to get out of it when needed instead of being stuck there by using 1.
ExecuteHam(Ham_Use, entity#_to_be_used, targetID, sourceID , TOGGLE, 1.0);

For example on Sven one could use Personal Medkit from bot or player AFK otherwise not being useful and give it to self remotely. As well as recharge it from wall charger without being in the same room even.
__________________

Last edited by DJEarthQuake; 06-13-2021 at 21:27.
DJEarthQuake is offline