Product Chat / more scripts on one entity

Author
Message
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 15th Sep 2019 09:55
maybe a stupid question ....but anyway...

how can i do to put two or more scripts to an entity..why only one script could be attached to it..is not too much limiting?

if for expamle i want to player can carry an object (and use the carry_object.lua script for this) but want player to be able to examine that object too ( using another one script) i cant...

this is onlya basic example of what i mean obviously.. but how we can acheve a result in this situations?

we need to combine them?? and if yes how?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Sep 2019 10:04
SwitchScript is good for that but you can just put the code inside one script and rely on variables to toggle between the states
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 15th Sep 2019 10:19 Edited at: 15th Sep 2019 10:20
hi smallg and thanks for your reply... but you can please elaborate more.. I'm new to lua scripting.. I know c# almost good (worked on unity and was fine) but now i'm in a complete new world and get confuse LOL

[quote]SwitchScript is good for that[\quote=]
are you referring to this https://github.com/amireh/SwitchScript



[quote]can just put the code inside one script and rely on variables to toggle between the states[\quote=]

can you explain me more ... please?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Sep 2019 14:27
SwitchScript ( e,"ai_cover" ) - Switch AI to use a different script
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 15th Sep 2019 18:06
ok thanks but the linked script need to be placed somewhere in the level as usually or cna be simply linked by name?

is any example (simple to understad by noobs like me) to can see that in action?
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 16th Sep 2019 02:05
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 16th Sep 2019 08:39
many thanks 3com.. i0ll try to figure it .. but i think i have too much to learn atm before i can compelte understand all of that
PC Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA NVDIA 1660GTX 6GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM

Login to post a reply

Server time is: 2024-11-23 21:20:09
Your offset time is: 2024-11-23 21:20:09