Starting some scripting, looking for some commands

Discussions about Coding and Scripting
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Starting some scripting, looking for some commands

Post by sektor2111 »

Marscaleb wrote:I keep thinking of how I do this in Unity, but it isn't working here.
Thinking is not working ? :omfg:
Why you don't use a "foreach" iterator for changing properties of an actor which exist ? Or a "consolecommand" ?
Marscaleb
Average
Posts: 48
Joined: Tue Jun 07, 2016 6:50 am

Re: Starting some scripting, looking for some commands

Post by Marscaleb »

sektor2111 wrote: Why you don't use a "foreach" iterator for changing properties of an actor which exist ? Or a "consolecommand" ?
Well, that would be somewhat expensive, wouldn't it? And I would have to run it repeatedly in case people connect late.
It would be more reasonable to just directly have a reference to the actor when it spawns.
There is already code in the mod that gets triggered when someone new connects, and spawns a SSCheck to work all the magic. If I could piggyback into that code to also tell this newly-spawned actor what the messages are supposed to say, they I'm only making one new call, minimizing overhead.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Starting some scripting, looking for some commands

Post by sektor2111 »

You can minimize overhead by not using ticks, timers because ModifyPlayer is being called for anyone entered later into the party, from there you can even call another function doing more checks than around new player - example all SSCheck types in that time + you can use a TAG for making things a bit faster. Monsters In UT are using to trigger actors by a foreach using TAG for actors target.
Post Reply