Scripts / [STICKY] Smallg's free scripts

Author
Message
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Feb 2014 20:00 Edited at: 27th Jan 2022 15:28
*updated 02/10/2020*
With the impending release of GG Max i am back to offer free scripts to GG users, if you would like to show your appreciation or support my work i would very much appreciate it if you can make a
paypal donation
but all my scripts here are free to use for your own game projects and i do want to make clear the donation is not required for the scripts to be used, i will be sharing my work as i always have done and will continue to do so regardless.. i use GG as a hobby and know you all do too so i'm not expecting anyone to buy anything, any donation is great, from 10p to £1 to whatever you want, i am back because i want to help make GG Max a success and while Lee and team can make it a great program it's the end users that will showcase what it can really do and we all know it's a tough process to do alone so let's help each other!
with that said.. while you are free to make requests with any donation i am not selling scripts and no donation should be made with any expectation - if you are unsure please message me before making any donation, thank you

NEW GG MAX SCRIPTS ***
1. flashlight script
2. hunger and / or thirst scripts
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
*******
GG CLASSIC SCRIPTS ***
links to the scripts for easier access now the thread is quite long
double jumping and dodge move
prone / crawling logic
vaulting / climbing logic
peek / lean logic
bow and arrows
lockpicking locked doors
zombie priest (fantasy pack character) script with dodging - trying to replicate the RE8 AI

OLDER GG CLASSIC SCRIPTS ***
allow variables to be remembered between levels (in standalone play)
https://forum.game-guru.com/thread/207801?page=22#msg2590518
Functions / custom commands
detect if player is looking at an object
https://forum.game-guru.com/thread/207801?page=7#msg2515459
detect if an object is looking at an object
https://forum.game-guru.com/thread/207801?page=12#msg2538121
check if an object is looking at the player
https://forum.game-guru.com/thread/207801?page=12#msg2541409
get distance between 2 objects (not player) & rotate an object to another object (not player)
https://forum.game-guru.com/thread/207801?page=5#msg2500807
rotate an object to co-ords instantly
https://forum.game-guru.com/thread/207801?page=14#msg2549716
rotate an object to co-ords slowly
https://forum.game-guru.com/thread/207801?page=14#msg2548949
auto sized Panel and Text in 1 function (thanks to amenmoses)
https://forum.game-guru.com/thread/207801?page=23#msg2600701
AI
free-for-all or team-based AI (24/05/2018)
https://forum.game-guru.com/thread/207801?page=23#msg2600794
team based AI with reloading
https://forum.game-guru.com/thread/207801?page=15#msg2550158
freeze enemies in time
https://forum.game-guru.com/thread/207801?page=10#msg2534302
respawn enemies (timer based on death)
https://forum.game-guru.com/thread/207801?page=10#msg2533489
spawn enemies in waves
https://forum.game-guru.com/thread/207801?page=10#msg2534312
grenadier soldier
https://forum.game-guru.com/thread/207801?page=10#msg2528215
zombies that follow waypoints
https://forum.game-guru.com/thread/207801?page=9#msg2524340
fish that follow waypoints and attack you
https://forum.game-guru.com/thread/207801?page=9#msg2526836
Stealth type suits (for the enemy)
https://forum.game-guru.com/thread/207801?page=7#msg2514856
Custom AI animations (if you dont want to use CSI anim calls)
https://forum.game-guru.com/thread/207801?page=7#msg2515306
AI uses cover (WIP)
https://forum.game-guru.com/thread/207801?page=6#msg2506431
Automated Turret
https://forum.game-guru.com/thread/207801?page=5#msg2504271
gang member AI
https://forum.game-guru.com/thread/207801?page=18#msg2566643
civilian (run away from player aggresion)
https://forum.game-guru.com/thread/207801?page=18#msg2566694
classic folder zombies
https://forum.game-guru.com/thread/207801?page=20#msg2574087
---

Traps
arrow and boulder
https://forum.game-guru.com/thread/207801?page=10#msg2529533
sliding/crushing wall trap
https://forum.game-guru.com/thread/207801?page=10#msg2531534
landslide (rock fall type effect)
https://forum.game-guru.com/thread/207801?page=6#msg2514329
trap door
https://forum.game-guru.com/thread/207801?page=4#msg2499822
moving or vanishing platforms
https://forum.game-guru.com/thread/207801?page=10#msg2534315
falling platform
https://forum.game-guru.com/thread/207801?page=11#msg2534721
spike trap
https://forum.game-guru.com/thread/207801?page=11#msg2534819
---

Quests
collect and deliver
https://forum.game-guru.com/thread/207801?page=5#msg2500378
kill x of y quest
https://forum.game-guru.com/thread/207801?page=3#msg2490852
--
kill x enemies to open door
https://forum.game-guru.com/thread/207801?page=10#msg2532248
---
survive for x number of seconds
https://forum.game-guru.com/thread/207801?page=23#msg2591006

Misc
new inventory scripts (26/04/2018)
https://forum.game-guru.com/thread/207801?page=23#msg2599808
vignette hud effect (horror style)
https://forum.game-guru.com/thread/207801?page=23#msg2593940
new pickups that detect obstacles and walls
https://forum.game-guru.com/thread/207801?page=21#msg2578696
generator with fuel that controls door and lights
https://forum.game-guru.com/thread/207801?page=18#msg2566582
upgrade vendors (weapons)
https://forum.game-guru.com/thread/207801?page=17#msg2563983
inventory scripts
https://forum.game-guru.com/thread/207801?page=15#msg2552135
carry objects around (visibly)
https://forum.game-guru.com/thread/207801?page=16#msg2562166
disable weapons zone (auto re-enabled after leaving zone)
https://forum.game-guru.com/thread/207801?page=15#msg2551865
have your conversations in sound (multiple entities supported)
https://forum.game-guru.com/thread/207801?page=15#msg2550652
convo script with subtitles and dialogue skip (with images)
https://forum.game-guru.com/thread/207801?page=16#msg2558294
convo script with subtitles and dialogue skip (no image)
https://forum.game-guru.com/thread/207801?page=15#msg2552195
non-important NPC chats
https://forum.game-guru.com/thread/207801?page=16#msg2558343
in game map with real time updates and objective markers (newer)
https://forum.game-guru.com/thread/207801?page=28#msg2638819
in game map with real time updates (older)
https://forum.game-guru.com/thread/207801?page=11#msg2535525
flash light with batteries (new Hud sprites)
https://forum.game-guru.com/thread/207801?page=13#msg2543583
flash light with batteries (older)
https://forum.game-guru.com/thread/207801?page=11#msg2535353
fishing
https://forum.game-guru.com/thread/207801?page=10#msg2530211
sprint limit
https://forum.game-guru.com/thread/207801?page=12#msg2538382
vehicle gunner (hop on the back of a vehicle and shoot at enemies)
https://forum.game-guru.com/thread/207801?page=15#msg2551879
custom blood particles when damaging enemies
https://forum.game-guru.com/thread/207801?page=25#msg2630137
blood splatter on kills (with spread)
https://forum.game-guru.com/thread/207801?page=23#msg2591010
blood splatter on kills (no spread)
https://forum.game-guru.com/thread/207801?page=12#msg2540251
loot drop from enemies
https://forum.game-guru.com/thread/207801?page=12#msg2540276
timed switch to find and open door
https://forum.game-guru.com/thread/207801?page=14#msg2544393
healing zone (with extra settings)
https://forum.game-guru.com/thread/207801?page=17#msg2563568
---
vertical door script (for secret door when you havent got an animation etc)
https://forum.game-guru.com/thread/207801?page=10#msg2531721
---
floating platforms
https://forum.game-guru.com/thread/207801?page=14#msg2547604
pick up and read a note (new with sprites)
https://forum.game-guru.com/thread/207801?page=12#msg2541219
newer version
https://forum.game-guru.com/thread/207801?page=21#msg2578696
---
HP bar (via coloured text)
https://forum.game-guru.com/thread/207801?page=9#msg2524790
---
Air strike / bomber
https://forum.game-guru.com/thread/207801?page=9#msg2526218
friendly version
https://forum.game-guru.com/thread/207801?page=18#msg2565776
---
collectable (use later) med kits
https://forum.game-guru.com/thread/207801?page=9#msg2526672
---
jump scare
https://forum.game-guru.com/thread/207801?page=7#msg2516046
---
placeable proximity mines
https://forum.game-guru.com/thread/207801?page=18#msg2565781
---
super fast speed boost (temporary adrenaline)
https://forum.game-guru.com/thread/207801?page=4#msg2497969
---
cut zombies in half
https://forum.game-guru.com/thread/207801?page=8#msg2517306
(video)
https://forum.game-guru.com/thread/207801?page=6#msg2514376
---
Jump from wall to wall (free running style?)
https://forum.game-guru.com/thread/207801?page=8#msg2519480
(version 2)
https://forum.game-guru.com/thread/207801?page=8#msg2519775
---
temporary shield for player & reflect damage
https://forum.game-guru.com/thread/207801?page=7#msg2514399
---
Teleporter
https://forum.game-guru.com/thread/207801?page=7#msg2514628
---
looting (adds a loot variable to dead bodies) *old - see newer version above for real item loot*
https://forum.game-guru.com/thread/207801?page=2#msg2488745
---
supply crate (animated box that allows item pickup)
https://forum.game-guru.com/thread/207801?page=2#msg2489791
---
friendly fire (warn and damage player if he kills an ally)
https://forum.game-guru.com/thread/207801?page=1#msg2488513
---

WIP
automated replay of level
https://forum.game-guru.com/thread/207801?page=17#msg2563744
wildlife
https://forum.game-guru.com/thread/207801?page=4#msg2500351
target practice
https://forum.game-guru.com/thread/207801?page=4#msg2500003
Taxi
https://forum.game-guru.com/thread/207801?page=8#msg2516418
earthquake effect
https://forum.game-guru.com/thread/207801?page=8#msg2517162
baby velociraptor script
https://forum.game-guru.com/thread/207801?page=7#msg2515225
Stealth killing (player)
https://forum.game-guru.com/thread/207801?page=7#msg2515310
Stealth killing (player) version 2
https://forum.game-guru.com/thread/207801?page=7#msg2515383
biometrics
https://forum.game-guru.com/thread/207801?page=7#msg2516054
crosshair (changes colour over an enemy)
https://forum.game-guru.com/thread/207801?page=6#msg2505295
shop
https://forum.game-guru.com/thread/207801?page=6#msg2511359
shop2
https://forum.game-guru.com/thread/207801?page=18#msg2566697
lift (elevator)
https://forum.game-guru.com/thread/207801?page=6#msg2506907
password (for locked doors etc)
https://forum.game-guru.com/thread/207801?page=6#msg2512294
Allies
https://forum.game-guru.com/thread/207801?page=5#msg2500674
https://forum.game-guru.com/thread/207801?page=5#msg2500805
minecraft style
https://forum.game-guru.com/thread/207801?page=5#msg2504684
raining (i recommend getting devcore (spelling?) decal though https://forum.game-guru.com/thread/213087)
https://forum.game-guru.com/thread/207801?page=5#msg2505226
vehicle
https://forum.game-guru.com/thread/207801?page=4#msg2493530
deployable auto mining station thingy
https://forum.game-guru.com/thread/207801?page=18#msg2566251
day & night effect (as the title says)
(removed as waiting for more control)
---

all scripts are free to use and modify as you wish for personal use.

if anyone has any issues or questions please let me know
or maybe some requests?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 9th Feb 2014 21:37
thanks for sharing those,

requests... i would have one



a item drop script, but instead of deleting the droped item

it should spawn there.



could be used for stuff like mine placement/ glowstick drop &

weapon drop.



Would be nice if it had a option to tick

wheter its suppused to be picked up again or not.

http://j0linar.blogspot.co.at/
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Feb 2014 22:21 Edited at: 9th Feb 2014 22:52
if/when more commands get added i'd be happy to have a go but for now i don't think that's going to be possible with the few commands we have. (i didnt ever use fpsc classic so i dont know anything about fpi etc so im purely working with the few lua commands that are in the files)



as for the time trial quests u can use a similar method to the drowning script as a timer (till a real timer gets added)



like so...

(first run just to prove if timer hits 0 the quest will fail)

http://youtu.be/PwMxWLN98aU



new code for timed quest





also now added
to global variables



note* obviously this way of doing a timer is really bad as it will fluctuate with the fps of the game but for testing purposes it's ok.

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 9th Feb 2014 22:30
ye you are right, what about player sprint - breath



use the breath part in combination with player sprint - if it runs out - player cant sprint and needs to wait untill the bar starts to fill up?

http://j0linar.blogspot.co.at/
PM
Conjured Entertainment
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Feb 2014 04:26 Edited at: 10th Feb 2014 04:32
Quote: "

here's a really basic drowning script (doesnt really kill u yet as there is no death if HP drops below zero... hopefully in future this will get fixed - or a better way to damage player HP will get added)"


Are you sure about that?



Question about your line of code...



AddPlayerHealth(e);



... isn't that adding health, because doesn't the (e) stand for the entity's number???



I played with prompting the e in several scripts and found it to print out as a number representing the placement of the entity in the map. (ie. 12th or 13th or 14th entity placed)

If that number were a negative number like -1 or -8 then it may subtract the health causing a death at zero. Maybe?

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Feb 2014 13:38 Edited at: 10th Feb 2014 13:41
Are you sure about that?

Quote: "

Question about your line of code...



AddPlayerHealth(e);



... isn't that adding health, because doesn't the (e) stand for the entity's number???



I played with prompting the e in several scripts and found it to print out as a number representing the placement of the entity in the map. (ie. 12th or 13th or 14th entity placed)

If that number were a negative number like -1 or -8 then it may subtract the health causing a death at zero. Maybe?"




yes it returns the entity number not the value to edit the HP by... the value that's used is in the entitys fpe file

i have set it to a negative value but it just makes the player HP display as a negative value once it drops below zero (hard to see in the video)

also it does kinda work... u can no longer shoot (guns get removed) or be killed by enemies (most of them will now ignore u completely) but there is no death animation or respawn if u still have lives remaining.

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 10th Feb 2014 21:23
@smallg thanks for the time trial snippet, should give ppl a option to get

gameplay stuff tested before we get a timer system in place.



If you are up to the task, what would you say to a

"collect 3+ specified entities to unlock a door script"?

PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Feb 2014 21:16
can't find a way to adjust player speed other than at the player marker so no way to limit the sprint for now... if a command gets added (or anyone knows a working one?) i will be happy to adjust my code to get that working.





3 keys door system....



the door script





the key script





and set
as a global



video



*note* keys can be collected in any order



is that what u had in mind?

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 11th Feb 2014 22:02
Totally and thanks,

well i would have some more ideas but as we havent yet full control over FPSCR, they will have to wait.



But am confident that we will see a major opening in the next Beta release.



For now i just wanna say thanks @smallg

http://j0linar.blogspot.co.at/
PM
BlackFox
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 11th Feb 2014 22:51
Some good example scripts here to help people learn. The quests will most likely be the *popular* items and they look good. You've provided a good starting framework that allows expansion.



Great work!!



There's no problem that can't be solved without applying a little scripting.
Conjured Entertainment
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Feb 2014 00:19
Quote: "yes it returns the entity number not the value to edit the HP by... the value that's used is in the entitys fpe file

i have set it to a negative value but it just makes the player HP display as a negative value once it drops below zero (hard to see in the video)"


Yeah, I did some testing after I posted and found that out too.



I like your code for the key. (it surprised me)



Destroy(e);

doorkey = doorkey + 1



I am surprised that it executed the code after the Destroy(e)

I guess doing it this way ensures that it will only increment once.

Neat!

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Feb 2014 21:24
@jolinar no problem and yh hopefully soon



@blackfox thanks, i'm certainly no expert scripter but sometimes that's a good thing because it allows me to try keep things simple.



@conjured haha yh it will continue to run the script until the "end
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st Feb 2014 20:34 Edited at: 22nd Feb 2014 19:53
new code for a random number generator and door that requires said code to unlock (sorry it's a bit messy but it took me quite a while to get it working how i like so i was more interested in function than looks)



globals required





script for the code generator (the first barrel in video)





script for the number pickup (the small brick from video)

*note this would be replaced by user input or seperate entities etc as u see fit, it's merely a placeholder for tutorial reasons*





and finally the door itself (thanks mainly to the original script)





video example here



hope it helps



edit* added some comments in code to try explain some stuff and removed the unneeded if statements

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 22nd Feb 2014 03:25
Hah thats a neat one ,

thanks for sharing

http://j0linar.blogspot.co.at/
PM
J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 6th Mar 2014 21:53
Hey smallg

do you have by any chance the FPSC ModelPack 22?







if you look at the beginning of the video, the Model Pack contains

a script that lets the player perform some kind of takedown/ decapitation in this case.



Would you mind lending a hand at converting this into lua?

This would really be greatly appreciated, if it where something less complicated i wouldnt ask.



The file responsible for the takedown is in Files/scriptbank/bond1/chainbrutedestroy.fpi



Anyways, something like this could be expanded even further with lets say a random action perform/ instead of using always the same along with some other things like skipping the takedown if playeer gets detected.

http://j0linar.blogspot.co.at/



PC SPECS: Windows 8 Pro 64-bit, Intel I7-3630QM 4.8GHz CPU, Nvidia GTX 675M - 2048MB GPU, 16GB DDR3 RAM
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 7th Mar 2014 07:47
That part will most likely have to be completely rewritten for LUA. I wouldn't say convert per say... it more so be a complete rewrite.

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Mar 2014 20:01 Edited at: 8th Mar 2014 20:03
J0linar wrote: "Hey smallg

do you have by any chance the FPSC ModelPack 22?

"




sorry no, i haven't ever used the original fpsc so all i currently have are the gold pledge packs from fpsc-r

i have held off on any extra purchases because i'm still not sure what'll work or not and hoping i will find whatever i need from the new store



nice video though, from the looks of it you wouldn't be able to tell how low the enemy is on HP (we don't have any control over AI yet) so i don't think it's possible for now but in future that'll change and it seems like quite a straight forward script flow based on HP and player input so after we get more control i'll be happy to help

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th May 2014 21:53 Edited at: 29th May 2014 21:54
new script based on the darkzone.lua

this one allows for a gradual increase / decrease of lighting based on the area markers - i added some comments inside the code but basically you choose an amount (changeamount) to adjust the lighting by (1~20 is best)

there is also a setting to turn on/off the initial "burst" of dark/light



darkzone.lua (script works on it's own - no globals needed)





video to show (compression really messed up the fade but you get the idea)





a pic to show my layout



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 29th May 2014 23:34
Thanks so much smallg! These scripts are great! Love the quest and dark-zone ones. For those people who are having lag issues for their competition levels, someone suggested in Lees blog to create an Occlusion systems with LUA. Sounds like a good idea. Just: Hide / Show (entity's) through trigger zones. Any ideas on this? A script would be nice...



Another question: is it possible to display a warning prompt, like: "you just killed a civilian", and reduce players health, or penalize the player by sending player back to last checkpoint, after killing a civilian, good guy type character? Such a script would be greatly appreciated too. Cheers! And good work!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 00:31 Edited at: 10th Jun 2014 21:57
well the Hide/Show script is possible but without knowing the (e)s for the entities im not sure it would work so well - i guess i could just do it for every single possible number but im not sure that would help, i will test it tomorrow



do you plan to use a character that is already in reloaded? (one of the stock enemies)

i had a quick go using the neutral script but the script stops running immediately on death so no time to display any warning



the trouble is we have no code for when they die so we need to run the check seperately - thus i again need to know the (e) values



i can do it but you would need to adjust the settings based on your (e) values



edit here is a friendly fire warning script





added some comments but you will need to know (e) numbers as i previously said, if you need further help getting it working i will be happy to answer the questions



as you can see in the video the message appears instantly and then 1 HP is taken (this amount is based on the 'damage' setting you use)

video





wasnt so tough to adjust my deathpoints script for this (even ended up finding some code i didnt need so it was useful for me too - still learning but having fun )

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 01:12
Great smallg! If you could just do an example script for Hide/Show, perhaps I could fill in the blanks. Yes it is a villager type character, turned tribal from an old fantasy character pack that I converted with Animer.



Right now I am using a modified neutral script so the villager just stands there in the way, not looking at me, or anyone for that matter. If I shoot him he falls down dead on the spot. Bad luck for him I suppose, but perhaps with this script, if the engine allows us to do it, I could just fills in the(e) values too? This would be a cool combat obstacle, like in Call Of Duty: don't want to shot a civilian!



Thanks so much for you help, hope I can help you too some time...
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 01:14
Wow that was quick! Amazing work!
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 01:16
Yes that's it! Great video, perfect script, you are the best!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 01:23
Quote: "Right now I am using a modified neutral script so the villager just stands there in the way, not looking at me, or anyone for that matter. If I shoot him he falls down dead on the spot. Bad luck for him I suppose, but perhaps with this script, if the engine allows us to do it, I could just fills in the(e) values too? This would be a cool combat obstacle, like in Call Of Duty: don't want to shot a civilian!"




yes the above soldiers (in the video) are using the standard AI script so there's no problem with them using a seperate script

my script is applied to a chips.x entity on the ground (but it can be run from any entity that wont be deleted - otherwise it will stop working )







place all your civilians in 1 go (i.e. without placing other entities, otherwise the (e) numbers wont be in sequence) use a script like this after placing your entities to return their (e) when near them - then put the the lowest and highest (e)s into the 2 settings inside my code, it should work fine.

you can technically place civilains at different times but that would require multiples of my script with different (e) numbers placed inside the settings (and i havent tested that so i'm not 100% sure it'll work without error)



hope that makes sense

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 01:27
This is great! I'll let you know if I need any help with it. Hope other can use this script too. Thanks again
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 01:37
Just one stupid question: where can you find the e numbers, are they displayed in the bar at the bottom of the interface? I don't see a number when I scroll over the entities. Thanks
AuShadow
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 30th May 2014 04:04
@smallg, you're coming up with some sweet scripts since 1.007 came out. Lol i only managed one script (well 3 really but they are all based around the one), the Hunger and Thirst script, was thinking of doing a bleeding healing one which would be pretty s
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 04:37
The friendly fire script is working perfectly, accept it gives me a point for killing a civilian instead of taking one way? What am I doing wrong?

Thanks!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 11:45 Edited at: 30th May 2014 11:46
Quote: "except it gives me a point for killing a civilian instead of taking one way? What am I doing wrong?

Thanks! "




inside the entity you used to specify how much HP is removed you need to set the quantity to a negative, if it is already a negative but still adding rather than subtracting then it should correct itself if you remove and replace the entity again (in the editor), sometimes it just bugs



@Aushadow thanks, yh it would be nice to have more control over the playerHP and lives etc but i think it'll come later

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 13:17 Edited at: 12th Jun 2014 20:27
new script based again on darkzone, this time a day & night type cycle... it's not perfect but it's better than nothing



added control for cycle speed, fog on/off (so you can keep the sky visible if desired), fog colour on/off (allowing you to set a custom colour in the editor for those maps with alien fog ), ambiance on/off (because i wasnt so happy with it making the terrain quite so dark - i prefer to set a medium level inside the editor)



it's really noticable how square the skybox is when using this and having fog on however... not really sure how to fix that





video



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
science boy
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 30th May 2014 13:27
smallg and au shadow if for any reason you want any models for free let me know as you have gone above and beyond the call of duty script givers i will aid thee



science boy

an unquenchable thirst for knowledge of game creation!!!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 13:55 Edited at: 10th Jun 2014 21:55
occlusion is now on next page

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 15:28
Thanks so much for this! Amazing work! This should help people in the contest.
AuShadow
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 30th May 2014 16:23
Lol a lot more scripts come from smallg then they do me all the scripts I release I am still learning with and they are just products of that where as smallg's creations are how I started learning and an absolute inspiration to keep learning. So definitely more credit to smallg

PC Specs: Windows 7 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz

Feel free to visit and edit the public FPSCR resource wiki page: http://fpscrresource.wikispaces.com/home
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 17:10
I think I should add the occlusion script in the trigger zone, correct? Some how it is not working...
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 17:51
could you be more specific as to how it's not working?

any error given?

yes you put it into a zone script and then when you enter that zone it will activate (if you are outside of the zone everything will appear as normal)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 18:03
Sure, I add a tigger zone, right click it, add the script I named the same as the function. Then I enlarge the zone to cover the area I need to occlude. I place the start maker outside of it, but when I run test game, and walk into the zone none of the objects I placed to be occluded occlude. No errors given. Strange, perhaps I'm doing ti wrong. Thanks
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 18:28
Also, sorry to be a bother, but what is the "quantity setting of the FPE file" I'm not sure what you mean by that? Do you mean Heath under statistics?
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 18:36
hmm i think you may need to adjust the view range setting?

because the commands currently only give feedback for if the player is in the zone or not (nothing for entities) i based the code around checking for those entities within range of the player



i didn't do much testing with this, literally just put those trees and such (as seen in the video) to test it was working so i may have missed something



but for testing could you change the line

Quote: "--set veiw range here

local distance = 1000"




to



Quote: "--set veiw range here

local distance = 100"




and tell me if it makes a difference (if it does then feel free to edit the number as you require.



if it doesnt then it may be that you have a lot of entities and you are actually going over the 999 (e) number?



hopefully that'll fix it

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 18:41
inside the reloaded folder -> files -> entitybank -> collectibles ->

is some files for the health entities (medpac etc)

you need to edit the FPE file of the entity you will use in your map (chips.FPE is the one i generally use but any is fine)

you will see a line that says

quantity = 50 (or something)

change it to

quantity = -1



now when you place the chips (or whichever one you changed) inside the map you can use it's (e) number inside my script

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 30th May 2014 19:08
As you have suspected it was just the range. After changing the number it worked fine, also the friendly kill script is working perfectly, now that I understand that quantity was related to collectible



FPE. You are the master!



Thanks so much. Too bad that when the health drops below 0 you only get negative numbers and no player death, but that is something that will come later, I suppose. This script will be very helpful...
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th May 2014 19:39
yh not something i can change for now i believe but if a command gets added i will definitely add a script to check player HP constantly (if it isnt added as standard of course)



glad you got the occlusion working

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 31st May 2014 03:54
Your Occlusion script works very well. I expanded it over my entire level made sure the entity number was high enough to cover the huge amount of entities I have on the grid, and my FPS shot up up from an average of 10FPs to 43 FPS. The trick is getting the distance to match with fog clipping. Now I can fly through a highly detailed map. Awesome! Your are a genius!
AuShadow
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 31st May 2014 08:52 Edited at: 31st May 2014 11:14
@smallg, trying to get a simple trap style script to work but at the moment can't get it to move, in fact it's almost as if the script itself freezes as it's failing to do damage aswell, could you have a quick look for me and see if you can spot where i'v
morphtactic
13
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 31st May 2014 14:14
Side note: for some reason, and I have read this from others, that I have to press f9: 3d edit mode, twice, before the frame rate will increase, in combination with smallg's occlusion script. It oddly works like a switch. I will write Lee about this...
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st May 2014 14:28 Edited at: 31st May 2014 14:57
it wont appear to move if you are moving it forward and backwards by the same amount

Quote: " -- Move entity forward by 1000 units

MoveForward(e,1000)

-- Move entity backwards by 1000 units

MoveBackward(e,1000)"


you would need to add in some delay if you wanted a visual movement (and 1000 movement is a lot - if you consider how far away from an object you would be using
Quote: "if PlayerDist < 1000 then"
then you will get the idea of how far it'd move)



as for the health.. well the script is right so it's an issue with the FPE file, i never had much luck with this either but maybe try copying a complete (stock health entity) FPE file onto your objects FPE (and then update the quantity)?





edit: so your FPE works fine for me, you need to add in a timer for the movement and the HP decrease - currently HP drops really fast but i did update the sound for you





although if you wanted to only have HP drop each time the player steps on it or something (and not constantly) then you could move the AddPlayerHealth line up in with the loopsound part and change loopsound to playsound (note i also noticed that if you hit exactly 0 HP you do freeze (no player control).... this would be really handy for disabling player input if we could find a way of getting current player HP





life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st May 2014 15:24 Edited at: 10th Jun 2014 21:52
ok here you go AuShadow





added in some settings to allow you to customise it as you see fit



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
AuShadow
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 31st May 2014 15:57
Thanks for the reply I have some ideas no I will try tomorrow thnx

PC Specs: Windows 7 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz

Feel free to visit and edit the public FPSCR resource wiki page: http://fpscrresource.wikispaces.com/home
AuShadow
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 31st May 2014 16:00
Posted before I saw your demo video and working script that's exactly what I was going for cheers

PC Specs: Windows 7 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz

Feel free to visit and edit the public FPSCR resource wiki page: http://fpscrresource.wikispaces.com/home
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st May 2014 17:33 Edited at: 1st Jun 2014 20:26
@AuShadow no problem - i wasn't sure if you wanted me to do it all for you or not so i started by just giving you advice but than decided i'd like a script like that working in my files so i just stole the idea, i had a minefield before but i liked the id

Login to post a reply

Server time is: 2024-12-22 02:58:55
Your offset time is: 2024-12-22 02:58:55