Scripts / [SOLVED] Can we scale an entity horizontal

Author
Message
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 14th Apr 2020 10:27
The function Scale(e,v) -- scale the entity from all sides.
The function xs, ys, zs = GetObjectScales( obj ) -- returns scale values of object in all axis

Would it be possible to some how scale an entity horizontal ?

Pcs
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

The author of this post has marked a post as an answer.

Go to answer
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Apr 2020 10:42
Not currently
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 14th Apr 2020 10:44
Ok thanks Smallg
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 14th Apr 2020 10:46
Yes.

ScaleObject( obj, x, y, z ) -- Scales object in all axis (Note: uses object id not entity!)

Copied straight out of global.lua!

Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 14th Apr 2020 11:15 Edited at: 14th Apr 2020 11:15
AmenMoses, i missed that one, guess i pressed the find next button to fast. hahaha
Thanks
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 14th Apr 2020 14:34
Be aware that if you scale something in test mode when you come back out to the editor it will stay at that scale!

What I do is create a script that sets all environment settings and object scalings back to default, attach it to a zone and make sure the player is in the zone before exiting back to the editor.
Saves a lot of frustration that way.
Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 14th Apr 2020 14:50
yes AmenMoses i just saw it. lol
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 14th Apr 2020 18:02
I wish (among other additions), the properties panel showed the scale factor,
the objects real world position, angle, etc. There could be a check box for if
the scaling and positioning by scripts adhered after exit test.

This is not to make scripts unnecessary, be to be a tool helper to scripters who
want to adjust the parameters in their scripts-- faster and more handily.
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 14th Apr 2020 21:27 Edited at: 15th Apr 2020 10:28
This post has been marked by the post author as the answer.


Link for growing tree and flowers
https://forum.game-guru.com/thread/221750#msg2629386
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 14th Apr 2020 23:40
That's really cool PCS.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th Apr 2020 00:29
I added that command about 3 years ago and this is the first time I've seen it used.
Been there, done that, got all the T-Shirts!
PM
Duncan_Idaho
4
Years of Service
User Offline
Joined: 29th Jul 2019
Location:
Posted: 15th Apr 2020 00:48
@AmenMoses: Is there a way to control the speed of scaling? I think it would be very usefull, to simulate the growth of plants
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 15th Apr 2020 06:05
AmenMoses thank you for adding it 3 years ago, its a very useful and cool function
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 15th Apr 2020 13:49 Edited at: 15th Apr 2020 13:55
Don't worry, Amen. I've got several uses of it in my game project.
I first messed with this at least a year ago.
Not everyone posts videos of their lua classes!

BTW, I am now finding (and at the time we discussed this-- it wasn't working)
but collision of re-scaled objects seems to be working just fine now.
Excellent, thank you.
PM

Login to post a reply

Server time is: 2024-04-26 14:22:16
Your offset time is: 2024-04-26 14:22:16