Serious Sam Classics: Revolution

Serious Sam Classics: Revolution

Puszek 26 May, 2016 @ 11:12am
script entity
The script entity still working only on dedicated server ?
If it works on any mode (single player, co-op etc.) Please let someone write how to where to start script and change the properties for any entity (change target for copier etc.)
Thx for info
< >
Showing 1-13 of 13 comments
Melissa 26 May, 2016 @ 11:27am 
I've added a quick example here:

http://docs.samrev.com/en/latest/scripting.html#script-entity

Let me know if this helps!
Puszek 26 May, 2016 @ 12:16pm 
Thank you, but I still don't know how to start
I wrote a small script but does not work
function example() {
local cop = GetByName("Copier")
local weap = GetByName("G_Buster")
cop.m_penTarget = weap
}
I'm not sure is it properly wrote script
Melissa 26 May, 2016 @ 12:48pm 
Well first of all, setting entity pointers isn't supported yet, but I'll add that for the next update as it's kind of important.

Second, you need to call the functions on the Entities handle. Documented here: http://docs.samrev.com/en/latest/handles/entities.html
Puszek 26 May, 2016 @ 1:04pm 
Thank you! :steamhappy:
local ent = Entities.GetByName("Some Gnaar")
print(ent)
ent.m_fMoveSpeed = 10
This example is good, but editor crashed :(
Melissa 27 May, 2016 @ 12:04am 
Lol, I'll have to check that soon. Thanks.
Puszek 27 May, 2016 @ 3:29am 
no problem :)
Puszek 27 May, 2016 @ 4:58am 
entity script some working, but the crash occurs when changing properties for entities:
(ent.m_fMoveSpeed = 10, copier.m_penTarget = PowerUp etc.)
Last edited by Puszek; 27 May, 2016 @ 11:47am
Puszek 25 Oct, 2016 @ 12:42pm 
I don't know why this script on deactivate trigger not working:
local trigger = Entities.GetByName("Some_Trigger") trigger.m_bActive = false print(trigger.m_bActive)
In the console write that it's deactivate (false) but trigger still is active
Melissa 25 Oct, 2016 @ 12:49pm 
Right, there should be a way to send events to other entities. Setting m_bActive isn't going to do anything if the trigger is already running.
Puszek 25 Oct, 2016 @ 1:07pm 
How to send event to other entities using a script entity ?
Melissa 25 Oct, 2016 @ 1:12pm 
There is currently no such way, we'll have to add that. Thanks for the feedback!
Puszek 25 Oct, 2016 @ 3:29pm 
I don't know how to connect playerhandle from Entities command GetAll/LocalPlayers with Players commands in order to modify properties (speed etc.) or even kick player. I trying everything but still not working :(
Melissa 25 Oct, 2016 @ 3:37pm 
Take a look at the code for CCC in the scripts folder, I believe there's some relevant code there.
Last edited by Melissa; 25 Oct, 2016 @ 3:37pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50