Page 1 of 1

How to know who activated Slomo in Pre-Alpha?

Posted: Tue Dec 13, 2022 3:28 am
by Mighty Spirit the 2
I was reading through the old SFD updates blog post and found this: The Slow-Moving Update

This got me thinking, if the game could tell who activated slowmo by making them faster and their projectiles, was it possible to know who the owner of the projectile was? I know the owner function of projectiles wasn't added until after Steam came out years later.
So how did the game know? And this wasn't possible to read via scripts?

I already searched through forums and didn't find anything.
If the devs ever come back here maybe i'll get an answer.

Re: How to know who activated Slomo in Pre-Alpha?

Posted: Tue Dec 13, 2022 11:00 am
by Odex64
ScriptAPI != Game Code

The ScriptAPI is just a bridge of the actual game functions. Let's say you write a script and use an IPlayer instance to kill someone... that class is an abstraction layer of the actual Player class that SFD internally uses.

That's used to prevent people from editing some fields or calling specific methods, it also explains why all classes in the ScriptAPI are prefixed with I.
Basically if you use an IProjectile instance to manipulate bullets, there's an equivalent class called Projectile that SFD internally uses, with a lot more methods & fields for a finer control.

So back to your question, most likely SFD had some methods to know which player activated slow-mo, but those methods aren't exposed in the ScriptAPI.