Scripts / Smallg's free Max scripts

Author
Message
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Mar 2022 12:15 Edited at: 10th Jul 2023 21:06
if you want to show your appreciation or want to help me provide more free scripts for the community
please consider giving a donation if you can afford it - not required though, please use my scripts in your games as you wish but do not sell the scripts or claim them as your own work

guides / tutorials
1. how to use dynamic lua in Max
2. how to get waypoints and follow paths in lua in Max

Max scripts
1. flashlight/torch script
2. hunger and / or thirst scripts
(updated thirst script should now work with max)
3. freezing cold temperature HUD effect with heat zones
4. countdown timer (i.e. complete level before timer expires)
5. kill x enemies quest
6. portal gun
7. lock items so you need to pick up other items first to unlock them
8. radial weapon select inventory
9. animated pickups
10. stealth/hidden AI combat
11. motion tracker
12. stop the dot mini game
13. picture sequence lock mini game
14. squash the bugs mini game
15. quick travel / teleporter
16. Procedural sprite maze / dungeon mini game
17. breakout mini game
18. flappy bird mini game
19. NPC avoids dynamic obstacles while patrolling (Max only)
20. basic moving entity script
21. spawn NPCs in waves (horde survival, tower defence etc)
22. fishing scripts and models
23. bullet holes and blood splatter on walls
24. a little function to check if a key was pressed (not held like the default code does)
25. simple move and rotate
26. local custom prompt / text on an entity
27. pick up and inspect object script
28. skyrim / bar style radar
29. zone to spawn random items
30. enemies drop loot on death
31. functions to rotate in 3D to face a target position (& get position on edge of sphere)
32. quest system for max
33. stamina for player
34. rhythm beat game
35. zombie script to make them behave like the mannequins from RE SoR
36. animation viewer for entities using the new named animations
37. apply multiple behaviours to a single object
38. resource nodes
39. fade NPC corpses
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Mar 2022 12:24
a local prompt that lets you change the position, color and size of the text
this is basically a form of TextCenterOnXColor() but attempts to place the text at the target entity
you can copy the PromptLocalPosition() function to your script or add the attached script and call the function from there
the attached script comes ready to display a local prompt you can customise in the editor
PromptLocalPosition(e, txt, ox,oy, rng, size, r,g,b)
e = the entity the text should be local to
txt = the message text you want to display
ox = the x offset in screen space (0 = left of screen, 50 = center of screen, 100 = right of screen, etc)
oy = the y offset in screen space (0 = top of screen, 50 = center, 100 = bottom, etc)
rng = the range at which it will stop start/showing
size = the text size (1 ~ 5)
r,g,b = red, green, blue color
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Mar 2022 12:37
inspect objects - pick them up, spin them around and put them back again.
good place to start if you have an inventory or a hidden puzzle type game that needs a bit more interaction
pick up with 'E', inspect it with 'W/S/A/D' and put back with 'E'
set your own messages and speeds in the editor
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Mar 2022 12:50 Edited at: 12th Apr 2022 15:06
skyrim style radar bar
add your icons to a bar style HUD radar
add radar_bar.lua to an alwaysactive = yes object
you can add radar_entity.lua to any object that doesn't have a script and change the editor properties to point your desired icon
if you want to assign an icon to an entity with a script you can call AddToRadar(e,imagename, fixedsize, ignoredistance) from within it's own script
e = the entity number
imagename = the name of the image with extension i.e. "icon1.png"
fixedsize = 0 or 1, 0 = false, 1 = true, if you want the icon to scale based on how far away the entity is
ignoredistance = 0 or 1, if you want the icon to show regardless of the max range set in radar_bar.lua

update (05/04/2022): if you want to remove an icon from the radar (i.e. after it has been collected or reached) you can use RemoveFromRadar(e) and pass in the entity number of the entity that was used to add the icon.
(download the new version below)


lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st Apr 2022 15:52
a zone that will spawn a random item when entered
setting for how many times it can be triggered so the player can leave and re-enter the zone to trigger another item multiple times or you can have it only trigger once.
name all the entities you wish to spawn the same and put the name in the zone's script properties so it knows what to look for.
make sure all your entities are not static so they can be modified during gameplay
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Jun 2022 13:49 Edited at: 23rd Jun 2022 12:20
loot drop scripts
(edit: 23/06/2022 - new version that works for classic too)

setup:
1. place a character and give it loot_manager.lua behaviour
1.a. name must match all enemies you want to drop the loot linked to this character
1.b. make it always active = yes
2. place a loot item and give it loot_item.lua behaviour
2.a. link it to the character from step 1
2.b. make it always active = yes
3. place loot you want to actually drop from the character and link it to the loot in step 2 (these can keep their original scripts so they can be collected etc)
(you can link up to 10 items in max currently so that's 9 loot for the pool plus 1 for linking to the entity that holds loot_item.lua)
3.a. (optional) you can link a particle to each of your new loot and give it glue_entity.lua (thanks to Amenmoses) which will work like a particle trail for the loot drop
4. repeat steps 2 & 3 for any other loot you want to drop - i.e. different types of ammo or guns
(again, this can be done for up to 9 different types of loot - so you can have 81 entities in your loot pool per character)
5. set the drop chance in the character from step 1 for each (100 loot_chance = 100% chance to drop when killed)
6. place enemies in your level with the same name as your character from step 1 (these can keep their original behaviour and don't need to be linked

example image of 1 loot drop group


you can do this for as many groups as you like giving each character a new name to separate the groups (if you name the keep the same name the characters will drop loot from each group)
so if you want zombie 1 to drop just metal or cloth etc you can name them different to say a human which will drop ammo or food etc (and of course link different loot to each)

due to no cloning or spawning in Max i recommend making sure your level has enough loot placed so that if the player collects it all you will still have new pools available in the level to take over (i.e. name enemies in groups - the higher the drop chance the more unique pools you will need)

using a more conservative approach to loot drops with a lower drop chance and only 1 group

using a more drop-heavy gameplay where i have cloned the same group multiple times so each character can drop a lot of loot


glue_entity.lua attached thanks to amenmoses for the code (tiny edit in this version to allow my script to reset the particles position before the glue calculations are done as Max doesn't restore the particle emitter position in the editor if they are moved during game)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 25th Jun 2022 21:59
Great script smallg , thank you

Dave
Windows 10 Pro 64 bit
AORUS B550 Master Motherboard
GeForce RTXâ„¢ 2070 GAMING OC 8G
AMD Ryzen 9 5950X 16-Core Processor 3.40 GHz
128 GB DDR4 RAM
3840 x 2160 ,60 Hz
PM
SampeyFS
3
Years of Service
User Offline
Joined: 26th Feb 2021
Location:
Posted: 3rd Jul 2022 12:00
Good morning I am looking for someone to make me scripts for gameguru max I pay 3 euro per script for info SampeyFSGaming Discord
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th Jul 2022 16:12 Edited at: 5th Jul 2022 16:34
rotate around X and Y to face a point
note: entity must be facing north in Max by default when imported

this one rotates directly to a target location


or this one will just return the angles required so you can use them later



bonus is this get point on edge of a sphere (or hemisphere) function i used to generate my target positions
you pass in the distance from the center you want the position to be and an optional true or false for if you want it to be a hemisphere or not (i.e. if you set second param to false it will also return negative y values)
the returned values can be added to an origin point (i.e. the center) to get positions on the edge of a sphere around it


an example usage can be seen here to rotate this gun to face the targets that randomly position themselves around it in a hemisphere
note: this is using amen's quatlib functions to do the transition rotations



to do the slow rotation it looks like this (note: just a snippet, this won't work as is)


note2: sqrd3() is just a basic distance check (i.e. amen's sqrd() function with y added in)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Jul 2022 18:12 Edited at: 27th Jul 2022 22:36
Quest system for Max


Quote: "1. attach quest_giver.lua to the character you want to trigger the quest / interact with the player to start / end the quest
(make always active = yes is a good idea for big maps)

2. attach quest.lua to some entity and link it to the quest_giver entity from step 1
2.a. change the type of quest in the behaviour to kill / collect
2.b. place some targets for the quest name them the same as the entity in step 2 and link them to it
(these entities in 2.b. can have their own behaviour logic and can link to flags etc)

3. attach quest.lua to some entity and link it to quest entity from step 2 (not step 1)
3.a. change the type of quest in the behaviour to reward
3.b. place some reward items, name them the same as entity in step 3 and link them to it
(these entities in 3.b. can have their own behaviour logic so you can collect them etc)"


repeat steps 2 and 3 as much as desired for the requirements / rewards desired in your quest (up to 9 links allowed per quest / quest_giver entity)

repeat for as many different quests as you desire in your game
(note: quests can contain multiple kill / collect requirements just make and link more quest entities)

demo map included below so you can see how the video is set up (drop it in your mapbank inside your mydocuments Max files and add it to your own project via the project hub


if you want to show your appreciation or want to help me provide more free scripts for the community
please consider giving a donation if you can afford it - not required though, please use my scripts in your games as you wish but do not sell the scripts or claim them as your own work
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Jul 2022 10:30 Edited at: 22nd Jul 2022 10:30
stamina script - to limit the player's ability to run (and jump)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Jan 2023 15:34 Edited at: 6th Jan 2023 16:03
Music beat rhythm game scripts

instructions:
1. download a .wav file
2. use BeatGenerator.exe to generate the beat times from the .wav file
3. add these 2 files to your GG files (my documents -> audiobank/user)
4. add the .lua scripts to your my documents -> scriptbank folder
5. add beat_song.lua to an object
5.a. give the .txt file with the beat timings in the behaviour
5.b. give the .wav file as sound 0
6. give 4 objects each beat_obj.lua
6.a. change each to a different beat type in the behaviour
6.b. link each to the song object from step 5
7. duplicate each object from from step 6 8x (i.e. you will now have 9 objects of each note type) *Do not link these duplicates to the song object*
7.a. link each duplicate to the original note object
(you will now have 1 song object which is linked to 4 notes, each of the 4 notes then links to 8 further note objects)

8. add beat_hit_detect.lua to an object and link this to the song object too (from step 5)
(repeat steps 1~8 (plus the optional steps) for as many songs as you want on the map)
9. add player_input.lua
optional steps
(remember you can only link up to 9 objects together max)
10. add a particle, name them "Particles" (which should be the default name) and link it to the song object
11. add a couple lights, give them strobelight.lua and link them to the song object (note: this is not the default strobelight script as that one doesn't work)
12. add a dancer, give it dancer.lua and link it to the song object
you will end up with something like this


and the in game result should look something like this


beat generator can be downloaded from here
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Jan 2023 12:37
script to recreate the mannequin horror movement from the resident evil game - shadows of rose.
add the script and byc to your 'my documents' for max, attach to a stock zombie character (or character that has the same animations / animation names as a stock zombie)

lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Loretta
7
Years of Service
User Offline
Joined: 13th Aug 2016
Playing: Generation Zero; Skyrim SE , Fallout 4, In VR- Pistol Whip,
Posted: 11th Jan 2023 19:53
smallg Thank you so much! This is amazing work. I appreciate all the work you've done all these years. Can't wait to Dive in!
I sent a donation.
Alienware Aurora R10, Windows 10 64 bit, 64GB Dual Channel HyperX(TM) FURY DDR4 XMP at 3200MHz, AMD Ryzen(TM) 9 5900X (12-Core, 70MB Total Cache, Max Boost Clock of 4.8GHz) Nvidia GeForce RTX 3080 10Gb GDDR6X
Alienware M15 Laptop i7-8750H, GTX 1070 Max Q
VR : HP Reverb G2, V2 ,Oculus Quest 2 and Oculus Quest 1
PM
EyeFly
2
Years of Service
User Offline
Joined: 8th Nov 2021
Location: Oregon, United States
Posted: 12th Jan 2023 09:40
Awesome work!! I need to get my headset connected to my computer so I can start messing with some vr too.
Keep Making Stuff You Enjoy.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Jan 2023 17:36
thanks, i really appreciate the feedback, hope you find something useful or inspiring and as always, let me know if you have anything you need / want to see in GG, i enjoy recreating other game systems / mechanics

the beat rhythm was inspired by the addition of VR as beatsaber is my favourite VR game but the version i released is intended for normal play (WASD to hit the beats) - it does have some basic VR support but i can't really recommend VR yet until more lua gets exposed (most notably both hands working)
Quote: "Awesome work!! I need to get my headset connected to my computer so I can start messing with some vr too."
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 16th Jan 2023 15:13
very cool smallg, the mannequin horror: it feels like something creeping closer and closer.. love that. also cool when you don't watch..
Harry
Harry
When nothing goes right, go left
PM
Guru
2
Years of Service
User Offline
Joined: 25th Mar 2022
Location:
Posted: 23rd Mar 2023 05:57
Just want to drop by and say thank you very much for the resources you've put in. This is tremendously useful for newcomers like me.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Apr 2023 14:49 Edited at: 4th Apr 2023 14:57
animation viewer for the new named animation system - cycle through up to 9 looping animations
set your animations in the Max importer and this script will automatically let you select them when you attach it as a behaviour.
use Q / E to cycle through them when you're nearby.



example of the animation list from the max importer i used for the model
(note: models seem to need to be set as a non-character model otherwise the animations get replaced by the stock animations!)


you need to place the script and the byc files in your Max files in 'my documents' and then 'scriptbank/smallg_max/'
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 8th Apr 2023 10:53 Edited at: 8th Apr 2023 10:55
Hello smallg,

Thank you for this superb script demonstrating your skill as a software engineer.
It is a fact that you investigated deep inside the complex mechanism of GameGuru MAX engine controlled by all those intricated lua scripts and their variables. Congratulations.

I take the opportunity of this comment to ask you if you have some information about the other settings defined in the asset importer.
I am referring to the "left", "right" and "any" parameters (see this attached screen capture ). Thanks in advance.

PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Apr 2023 15:42
i have not seen them used yet but i would guess it is intended for left or right handed weapons (any being either hand)
though why there's only 1 number and what you're supposed to put there or if it even works is anyone's guess - perhaps if you catch a stream it's a good question to put to Lee directly
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Tater
1
Years of Service
User Offline
Joined: 30th Mar 2023
Location:
Posted: 23rd Apr 2023 23:59

is there a way to use "forceplayer(ang, vel)" and use the ang to force the player in the forward facing direction. It works great but it just keeps going to the same angle. I'm using a grappling hook and I've made it so that pressing LMB releases you from being pulled all of the way to it and the hook comes back to you but you drop straight down. I'd like the forcePlayer to be able to travel in the forward direction of the player and "bump" the player forward a little on release. I just can't get how to force forward not at an angle.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Apr 2023 09:29
ForcePlayer(g_PlayerAngY, force)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Tater
1
Years of Service
User Offline
Joined: 30th Mar 2023
Location:
Posted: 24th Apr 2023 18:58 Edited at: 24th Apr 2023 21:49
That worked great, Thanks!


PM
Tater
1
Years of Service
User Offline
Joined: 30th Mar 2023
Location:
Posted: 26th Apr 2023 16:27 Edited at: 30th Apr 2023 16:55
The "forcrplayer" works great but for an additional "boost", is it possible to also set a distance it? What I'm going for is that on mouseclick beside the force going forward I'd like to be able to set a distance that it forces without adjusting the amount of force.


SetFreezePosition( ppx, ppy, ppz )


--LMB to release and give "momentum" in direction you're facing

if

g_MouseClick == 1 then
--move player forward after mouseclick
ForcePlayer(g_PlayerAngY, 2)
gh.state = "holding"

elseif

g_MouseClick == 0 then
TransportToFreezePositionOnly()
--move player forward after arrival at hook
ForcePlayer(g_PlayerAngY, 1)
end


sorry the "snippet" didn't seem to work.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th May 2023 11:15 Edited at: 4th May 2023 11:15
you can apply the force over a longer duration by calling it for a certain amount of time yes.
like
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Tater
1
Years of Service
User Offline
Joined: 30th Mar 2023
Location:
Posted: 4th May 2023 15:05
Thanks SmallG. Sorry for "hijacking" this thread.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th May 2023 14:58 Edited at: 23rd May 2023 20:06
edit: new version added 23/05/2023
script to allow you to assign multiple behaviours to a single object - for those that aren't able to code or don't want to bother trying to force 2 scripts to work together this will allow you to run multiple scripts on 1 object (it will just run them 1 by 1 so best used with scripts that don't overwrite each others logic)

here you can see how i get multiple behaviours all working on 1 object


or

1. apply your behaviours to some objects as you would normally, set the settings as you want them to be on the final object
2. place the final object and give it this 'behaviour_chain' behaviour, copy the name of the behaviours from your other objects (in step 1) - remember to include any sub folders like "objects" or "rpg" etc
3. link the objects to your final object in the order you listed the scripts - i.e. if you put "effects\glow" as the first behaviour name then link the object from step 1 that has the "glow" behaviour first.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 5th May 2023 15:22
That's great smallg! Thanks!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd May 2023 16:01 Edited at: 25th May 2023 19:43
resource nodes for RPG resource gathering.


1. place some entity to act as the resource node and give it 'Resource Node' behaviour


2. place 1 entity to act as the collectable resource and mark it as 'is collectable' and 'is resource'


and give it 'Collect Object' behaviour (this is part of the RPG core scripts)


3. link the node and the resource together


(repeat this for any different resource types that you want to drop from the node - it will drop all types but you only need 1 of each type, the actual drop amount is set in the behaviour - currently just drops the same amount of all)

adjust the behaviour settings to your liking.

repeat for all different types of nodes you want in your game.

now updated with download link some pickaxes to use thanks to Graphix
(drop them in your 'My Documents' in the relevant folders)
posted with permission but models remain property of Graphix, please refer to his thread for any information and other great models
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 22nd May 2023 17:01
Awesome script smallg ! you can get a lot of uses with this.
PM
SampeyFS
3
Years of Service
User Offline
Joined: 26th Feb 2021
Location:
Posted: 30th May 2023 21:50
Thanks a lot guys for job done


PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Jul 2023 21:04
as requested on discord - a script to fade out NPC corpses
put the behaviour on an always active entity.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 18th Jul 2023 18:10
Thanks for the fade_corpses script smallg. Excellent!
PM
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 11th Aug 2023 05:54 Edited at: 11th Aug 2023 05:57
Hi smallg I would like to ask for an addition to your excellent script "LOCKED ITEM" instead of the Door being Deleted on
finding Key and pressing "E", would it be possible to include lua code to Animate the Door to Open.
I looked at the lua code in Necrym59's "DOOR" Animating Door, but my knowledge of lua made it impossible for me to
add part of Necrym59's "DOOR" lua Code to your "LOCKED ITEM" lua Code.
I would pay you for adding this code to your excellent Behaviour.

Regards Ozziedave
foremost@valhallaweb.com.au
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Aug 2023 10:14
not sure which script is the locked item script, do you have a link to it?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 12th Aug 2023 00:21
Smallg it is about your Number 7 on the top list of Scripts "locked item script & unlock item script so you can set items to be locked until a prerequisite item is picked up"
Hope you can extend this script Thanks.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Aug 2023 13:00
ah sorry, missed it.
bit confused why you don't use the normal door behaviour for this if you are just trying to use a key on a door but i will look into updating the scripts anyway as it might be handy to have the option for them to animate when possible
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 12th Aug 2023 19:13
The reason for asking for addition to "unlock item script" is because I require the Player to pick up the key to unlock
the door not just press E at the door with no key.
Thanks Again
PM

Login to post a reply

Server time is: 2024-04-25 16:42:07
Your offset time is: 2024-04-25 16:42:07