Thing_SetScale?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Thing_SetScale?

Re: Thing_SetScale?

by Arctangent » Thu Sep 10, 2015 3:28 pm

Xaser wrote:2012. D:
This is a very valid point, yes.

Re: Thing_SetScale?

by Xaser » Thu Sep 10, 2015 12:17 pm

2012. D:

Re: Thing_SetScale?

by Arctangent » Thu Sep 10, 2015 12:06 pm

LilWhiteMouse wrote:
NeuralStunner wrote:You can set its scale through ACS with [wiki]SetActorProperty[/wiki]. Possibly an OPEN script. Won't appear that way in map editor, and you'd have to give it a TID, but it would work.
You don't need to use TIDs. This is basically what I use:
Couldn't you just use [wiki]A_SetScale[/wiki] for this?

Re: Thing_SetScale?

by Xaser » Thu Sep 10, 2015 11:12 am

This can be closed with [Already In] since SetActorProperty handles this, as mentioned.

Re: Thing_SetScale?

by CaptainToenail » Mon Apr 09, 2012 2:42 pm

Ah, ok. :)

Re: Thing_SetScale?

by NeuralStunner » Mon Apr 09, 2012 1:57 pm

LilWhiteMouse wrote:You don't need to use TIDs.
True!
LilWhiteMouse wrote:ACS_NamedExecuteAlways
You can also use the much shorter [wiki]CallACS[/wiki].

Re: Thing_SetScale?

by LilWhiteMouse » Mon Apr 09, 2012 1:48 pm

NeuralStunner wrote:You can set its scale through ACS with [wiki]SetActorProperty[/wiki]. Possibly an OPEN script. Won't appear that way in map editor, and you'd have to give it a TID, but it would work.
You don't need to use TIDs. This is basically what I use:

Code: Select all

ACTOR BigTreeRandom : BigTree REPLACES BigTree
{
	States
	{
	Spawn:
		TRE2 A 0
		TRE2 A 0 ACS_NamedExecuteAlways ("BigTreeRandom", 0)
		TRE2 A -1
		Stop
	}
}

Code: Select all

#library "BigTreeRandom"
#include "zcommon.acs"

script "BigTreeRandom" (void) {
SetActorProperty (0, APROP_ScaleX, random (0.8, 1.2));
SetActorProperty (0, APROP_ScaleY, random (0.8, 1.2));
}

Re: Thing_SetScale?

by NeuralStunner » Mon Apr 09, 2012 1:16 pm

You can set its scale through ACS with [wiki]SetActorProperty[/wiki]. Possibly an OPEN script. Won't appear that way in map editor, and you'd have to give it a TID, but it would work.

Alternatively, pass (args[0] / 1000) to [wiki]A_SetScale[/wiki]. Setting the argument to 1000 acts as 1.0, and you can scale to 3 decimal places of precision. (If the arg is 0, assume 1.0 as default.)

Though it would be pretty great to set certain properties (including user variables) via UDMF.

Thing_SetScale?

by CaptainToenail » Mon Apr 09, 2012 12:19 pm

Would it not be cool to be able to set the scale of a thing using the map editor? Imagine you have a lot of repetitive trees, rocks etc. that would look better if they were all slightly different sizes.

It could be a property of an object set in UDMF mode
or...
an action special so you could apply it via acs
or...
perhaps you could make it possible to set the scale property as a thing argument, i.e.

Code: Select all

ACTOR Rock 12345
{
  Radius 16
  Height 16
  Scale Args[0]
  States
  {
  Spawn:
    NROK A -1
    Stop
  }
}

The only way to do this at the moment as far as I know is to either create many multiple versions of the same actor with different scale properties, or use A_Jump with lots of states controlled by thing arguments.

Top