Product Chat (Early Access) / How do I add scripts in Max?

Author
Message
DaveKirk
2
Years of Service
User Offline
Joined: 4th Feb 2022
Location:
Posted: 8th Mar 2022 18:21 Edited at: 8th Mar 2022 18:50
Hi,
sorry if this is a newbie question, i want to add this script to the AI to give them flashlights, I have no idea where to start

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Mar 2022 19:22
Didn't wherever you got the script from include instructions for use?

To make the script show up in MAX's 'behaviours' add the line:
-- DESCRIPTION: light npc

at the top of the script.
Been there, done that, got all the T-Shirts!
PM
DaveKirk
2
Years of Service
User Offline
Joined: 4th Feb 2022
Location:
Posted: 8th Mar 2022 19:59 Edited at: 8th Mar 2022 21:20
@AmenMoses
Thanks, I followed this
https://forum.game-guru.com/thread/221427#msg2624580
but the light doesnt seem to attach to the character
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Mar 2022 20:52
That's a link to this thread.
Been there, done that, got all the T-Shirts!
PM
DaveKirk
2
Years of Service
User Offline
Joined: 4th Feb 2022
Location:
Posted: 8th Mar 2022 21:21
@amenmoses
Apologies
corrected it now
I have it all working other than the rotation of the light is all wrong
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Mar 2022 10:24
What is all the angle offset malarkey about?

Try it without that first.
Been there, done that, got all the T-Shirts!
PM
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 9th Mar 2022 16:23
Hi AmenMoses,
I've been working with the light_npc script in Max too and noticed that although the spotlight will lock to the soldier, when the soldier turns the spotlight seems to spin like a top in different directions.
PM
science boy
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 9th Mar 2022 16:39 Edited at: 9th Mar 2022 16:42
Oooh i not explored this yet love the light link

Dude having a light source attached to an entity in any tgc products is so futuristic it beggars belief!
Never in the world of tgc has any entity held a light source, let alone a moving ai character. this is stuff of future dreams in tgc world

In my day i had to make do with a shoe lace an airfix model and a giant torch as my characters
Im 50 now aint a kid travelled the world been in terrorist bombing shot at near kidnapped. Have an audi a house a fiancee a cat and ex dj and promoter and now home Manager. Have a degree and lots of quals and this is actually all true
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 9th Mar 2022 16:47
Here's the link to the scripts. Unfortunately they seem to work better in GG classic than Max at this moment, but still really cool.
https://forum.game-guru.com/thread/221427#msg2624559
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Mar 2022 20:24
Quote: "I've been working with the light_npc script in Max too and noticed that although the spotlight will lock to the soldier, when the soldier turns the spotlight seems to spin like a top in different directions."


Hmm, I've just spent a couple of hours trying to control the spotlight from Lua (which I could do in Classic) and I can't figure it out.
Been there, done that, got all the T-Shirts!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 9th Mar 2022 20:53
Quote: "Hmm, I've just spent a couple of hours trying to control the spotlight from Lua (which I could do in Classic) and I can't figure it out."

Well if you cant then just as well forget it
No one ever really leaves.
PM
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 9th Mar 2022 23:32
LOL ! I know right
PM
Supe
GameGuru Tool Maker
4
Years of Service
User Offline
Joined: 4th Feb 2020
Location: WORLD
Posted: 10th Mar 2022 08:03
Quote: "Well if you cant then just as well forget it"

seriously!!! in 2021 all games can do this at least
Desktop: corei5, ram32, graphic card6GB
https://drive.google.com/file/d/1KtN6HMp1VEInALBZ89hmUBwfzqbeL9Wz/view?usp=sharing
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Mar 2022 09:43 Edited at: 10th Mar 2022 09:46
Quote: "seriously!!! in 2021 all games can do this at least "

Which games have enemy hunting you down with flashlights ?
I do not recall any let alone all games.
No one ever really leaves.
PM
DaveKirk
2
Years of Service
User Offline
Joined: 4th Feb 2022
Location:
Posted: 10th Mar 2022 12:02
@synchromesh
Literally any game that has outdoor night scenes has enemies with flashlights
PM
Supe
GameGuru Tool Maker
4
Years of Service
User Offline
Joined: 4th Feb 2020
Location: WORLD
Posted: 10th Mar 2022 13:02
Quote: "Which games have enemy hunting you down with flashlights ?
I do not recall any let alone all games."

i mean cars, deadly bots and many more things not only stupid soldiers that cant shoot real bullets.
Desktop: corei5, ram32, graphic card6GB
https://drive.google.com/file/d/1KtN6HMp1VEInALBZ89hmUBwfzqbeL9Wz/view?usp=sharing
Supe
GameGuru Tool Maker
4
Years of Service
User Offline
Joined: 4th Feb 2020
Location: WORLD
Posted: 10th Mar 2022 13:06
Quote: "Literally any game that has outdoor night scenes has enemies with flashlights"

i have a solution for that without scripting, wait for the release date.
Desktop: corei5, ram32, graphic card6GB
https://drive.google.com/file/d/1KtN6HMp1VEInALBZ89hmUBwfzqbeL9Wz/view?usp=sharing
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 10th Mar 2022 13:17
This script works fine with regular bulbs, just the spotlights are acting up in Max.
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Mar 2022 14:28
Quote: "@synchromesh
Literally any game that has outdoor night scenes has enemies with flashlights "

Really .. I very much stand corrected then.
I have seen it in Cut Scenes etc but just do not recall it in Gameplay ..
Not a huge Gamer so maybe im behind the times
No one ever really leaves.
PM
Supe
GameGuru Tool Maker
4
Years of Service
User Offline
Joined: 4th Feb 2020
Location: WORLD
Posted: 10th Mar 2022 17:06 Edited at: 10th Mar 2022 17:12
@synchromesh
i think you guys must play some open world games and see what's going on in modern games. even in max Payne 1 the train map use lights on trains. (stalker shadow of Chernobyl , stalker clear sky , stalker anomaly)
Desktop: corei5, ram32, graphic card6GB
https://drive.google.com/file/d/1KtN6HMp1VEInALBZ89hmUBwfzqbeL9Wz/view?usp=sharing
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Mar 2022 19:22 Edited at: 10th Mar 2022 19:23
Quote: "i think you guys must play some open world games and see what's going on in modern games. even in max Payne 1 the train map use lights on trains. "

Ye cannot say i played any of those but ye trains car lights of course i have seen those but i just meant characters carrying torches with the beam of light as Bluemeenie demonstrated.
That i have not seen.
No one ever really leaves.
PM
bluemeenie195
6
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 10th Mar 2022 19:38
I did post that problem on GitHub
PM
Supe
GameGuru Tool Maker
4
Years of Service
User Offline
Joined: 4th Feb 2020
Location: WORLD
Posted: 11th Mar 2022 06:20
Quote: "carrying torches"

just check resident evil Series , in one of old and huge cave maps all of zombies carrying a torch on their hands . or just check dayz , in dayz zombie miners carrying a light bulb on their head.im gamer/coder man
Desktop: corei5, ram32, graphic card6GB
https://drive.google.com/file/d/1KtN6HMp1VEInALBZ89hmUBwfzqbeL9Wz/view?usp=sharing
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 11th Mar 2022 18:25 Edited at: 11th Mar 2022 18:26
A bit tricky to work lights in GGMax; here, I've attached a white light to the running car, even to the police one.
Anyway, that was in the early days.

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

Login to post a reply

Server time is: 2024-12-22 05:15:24
Your offset time is: 2024-12-22 05:15:24