Jump to content
  • 0

How to set player speed via ACS?


SubatomicPenetrationTTW

Question

I did a bit of reading on scripting, something I don't have experience with, and tried to follow what the wikis said to do to change player stats but it's not working. Can anyone tell me what's wrong with this?

Script 2 ENTER
{
	Thing_ChangeTID(0, 1000 + PlayerNumber()); // This assigns the TID
}

script 3 (void) {

SetActorProperty
(1000,aprop_speed,0.75)
;SetActorProperty
(1000,APROP_Accuracy,0.50)
;}

Sorry if this is horrible, again, literal first time doing anything of this sort.

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

I think you can actually accomplish everything in script 2 without a need for script 3. Note that you don't really need to set the TID here unless you are using it for something else in other scripts. You can use "0" to refer to the activator of the ENTER script, so it will affect every player that enters the game. Also, Accuracy is supposed to be an integer between 0 and 100, so I changed that too (to "50"), but you might need to adjust the value depending on what you want:

Script 2 ENTER
{
	SetActorProperty(0,APROP_SPEED,0.75);
	SetActorProperty(0,APROP_ACCURACY,50);
}

Let me know if that works.

 

 

Andarchitect

The DANDY Company

Edited by The DANDY Company

Share this post


Link to post
  • 0
8 hours ago, The DANDY Company said:

How does script 3 get called? 

I think I'm super dumb, it doesn't. If I put ENTER instead of void do you think it would work? I tried that earlier and got nothing, and thought something else was messed up.

Share this post


Link to post
  • 0
13 minutes ago, The DANDY Company said:

I think you can actually accomplish everything in script 2 without a need for script 3. Note that you don't really need to set the TID here unless you are using it for something else in other scripts. You can use "0" to refer to the activator of the ENTER script, so it will affect every player that enters the game. Also, Accuracy is supposed to be an integer between 0 and 100, so I changed that too (to "50"), but you might need to adjust the value depending on what you want:


Script 2 ENTER
{
	SetActorProperty(0,APROP_SPEED,0.75);
	SetActorProperty(0,APROP_ACCURACY,50);
}

Let me know if that works.

 

 

Andarchitect

The DANDY Company

Thanks a ton. Again, this is baby's first time using any kind of scripting. Very thankful.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...