Scripts / [STICKY] Smallg's free scripts

Author
Message
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 1st Jul 2014 13:34
small g fantastic work. could maybe have a character creator at start, human/elf/giant and have the settings on if choose giant.

as to a question. the moving object with damage.

i have animated swooping hammers, just remain and animate.

can you make the hammers touch sensitive, as in run through the middle and if they touch during animation will give damage. this is different to the object moving script.

not sure how to go about it?
any help be appreciated, if need a screenie let me know

cheers

an unquenchable thirst for knowledge of game creation!!!
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 1st Jul 2014 19:17
nah the actual code is for a lift, the video was just something that happened afterwards when i was testing how well the collision worked while moving around (very well i have to admit)

as for the hammer, not really sure as we dont get any actual collision checks, just on/off... most of my calculations are based on distance and as the hammer would be rotating rather than moving (from the sounds of it) it wont change in distance.

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 1st Jul 2014 21:46




how about a looped timer giving damage so it works with the axes as they swing in and out?

an unquenchable thirst for knowledge of game creation!!!
tomjscott
User Banned
Posted: 1st Jul 2014 22:12
You could use a combination of distance to determine if you are within its slashing range and the current point in the animation. So, if the axe is within a certain angle of rotation then it is a hit.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 1st Jul 2014 23:27
Quote: "You could use a combination of distance to determine if you are within its slashing range and the current point in the animation. So, if the axe is within a certain angle of rotation then it is a hit.
"


very true, thanks

well without anything to test it on a think this might be a good start


life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 2nd Jul 2014 22:17
thankyou will have a go when i get chance, thank you for your time small g

an unquenchable thirst for knowledge of game creation!!!
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jul 2014 22:31
ok, good luck

here's a video to show the next script to be released (when i finalise a couple more details - mainly multiple turrets - and polish the settings)

the model is in the store (another one of fraps' pieces) maybe in future we'll get some muzzle flash or smoke


life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Imchasinyou
10
Years of Service
User Offline
Joined: 22nd Mar 2014
Location: OH
Posted: 3rd Jul 2014 12:58
nice, I didnt think the turrets were animated. Either way, Once particles are available, this will look very nice and would be loads of fun in a level.

I am a very blunt person. I have NO filters in communication. I say exactly what I think and feel. If you think im being abrasive, its probably a personal problem because usually, Im not.
PM
unfamillia
Forum Support
13
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 3rd Jul 2014 13:52
I need this script!! I have turrets that are animated, that have not yet hit the store. Are Fraps' turrets animated already?

Cheers

Jay.

AuShadow
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 3rd Jul 2014 14:49
awsome work as all ways

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
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jul 2014 23:09 Edited at: 4th Jul 2014 14:04
nope they aren't animated afaik, just using a rotation to make them spin for now



here's the code - ok updated to work for individual turrets (just had the line in the wrong place) so now you can have some spinning faster, some firing faster, some not spinning at all etc

just follow this example (exchange the setting for whatever you require changed)

search_speed[1] = 10

search_speed[2] = 5

search_speed[3] = 2.5



^ will make turret 1 (the first one you placed in editor) spin twice as fast as turret 2 (second placed) and 4 times as fast as turret 3 (3rd placed) - i have placed this in the script (commented out) so you know where to set these individual settings



note i think for this to work properly you will need to edit the fpe to look something like this

the most notable differences are these 2 (wont be able to shoot them if you dont change the ischaracter and they will have the handgun sound effect if you dont change the weapon)

the others are just some default HP and auto-assigning the script

ischaracter = 1

hasweapon = modern\uzi







turret.lua - apply it directly onto the turrets





and a new video to show the individual settings in action (different from the example above - in mine, 1 turret is as default, 1 is set to search_speed = 10 and the 3rd has no_search = 1)





life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jul 2014 23:11 Edited at: 3rd Jul 2014 23:12
double posted by mistake

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
TattieBoJangle
10
Years of Service
User Offline
Joined: 7th Jan 2014
Location: United Kingdom
Posted: 4th Jul 2014 20:45
Thanks smallg great scripts as always perhaps you could upload them to the store for free





PC SPECS: Windows 8 Pro 64-bit, Intel I7 (PASSMARK 9529) 4GHz CPU, Asus R9 3GB GPU (PASSMARK 6858) 32GB DDR3 MEM (PASSMARK 2842)
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Jul 2014 20:46 Edited at: 16th Jul 2014 14:13
reworking my transport system



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 26th Jul 2014 13:38
Some nice scripts and examples of what can be done. Thanks

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Jul 2014 18:28
Quote: "Thanks smallg great scripts as always perhaps you could upload them to the store for free"


not likely but i will try to remember to upload the actual file alongside the code snippets in future so it's easier to use them

Quote: "Some nice scripts and examples of what can be done. Thanks"


thanks

any requests can still be made but for now i'm not adding anything new until 1.008 is out as i have heard it is causing issues again and so i want to test it myself (rather than just have to redo them anyway as it's only a week or so away)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Aug 2014 18:08 Edited at: 3rd Aug 2014 19:52
i saw this asked for somewhere so i made a grenade



ok it's done but it's not perfect, to allow for multiple grenades i had to turn off the explodable setting on the entity i used (otherwise it was destroyed after the first use) - hopefully in future we will get some fake explosion effects to place at the location

does kinda disappear quite fast so it looks like it's not actually landing (but it is, it's just hidden instantly)

you currently have unlimited number and just hold E to throw but with a little work you can add in a grenade limit and some grenade pickups







*bugs/notes*

only works on flat terrain (no way to tell how high terrain is)

wont detect for hitting objects untill it lands (i did try but as we only get distance checks it's just not possible to account for all object sizes)

also wont bounce or reflect off objects (collision just doesnt work yet for this)

so apply the code/script to any object (i used a barrel but if you have a grenade model it'll be better) and make it dynamic (also turn off explodable)

-as you can see reloaded does limit the script quite a bit but for a quick play around it's pretty fun







2nd video to show how it looks when hitting areas with no explosions (see near end of video)



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Aug 2014 19:22
Nice. Always come here for script ideas. Great thread full of valuable information.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 5th Aug 2014 01:19
Great job, smallg. And like Myke said, this is a great thread!

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Aug 2014 15:37
proximity mines from the new 1.0085 update
new placeable mines that allow you to now set traps for the enemy!

some notes;
- you need to set the mine you are picking up as always active (this is crucial or it will not work)
- you can pick up multiple mines but you will place them all in the same spot so it's kinda a waste (best to pick them up and place them 1 by 1... yes this is annoying but mines are dangerous objects so handle them with care )
- you need to hold 'e' for a second or so before the mine will place (it does kinda float a little but you can adjust the Y value if you so wish)

video


ok now the script


as always let me know if you have any issues

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Aug 2014 15:40
also if any1 missed it here is a fixed "standard" proxi mine script from 1.0085



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Uman
GameGuru TGC Backer
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location:
Posted: 14th Aug 2014 16:17
smallg,

Thanks very much for the scripts especially the Player Pickup which is a a fantastic contribution. Brilliant.

Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Aug 2014 21:40
Very cool. thanks again.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

morphtactic
12
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 15th Aug 2014 18:50
These are great scripts as usual! Thanks smallg too for your great help on my contest level. Without your scripts Past Life Regression would not have been possible!

I have a question. Is it possible to change the range the AI will start firing on the player though scripting? I found this command:

FireWeapon(entity index) - cause the specified entity to fire at the player

I will try and write a script using this command, but I think you can do it way better.

My problem, for the competition level, was that I found it almost impossible to create proper combat situations. Frankly it was almost always lame. In modern combat, soldiers do not charge at their enemies, unless there is no other choice, or the entire platoon is doing a thing called marching fire. I find the AI just keeps running after me, all of the time, which makes it easy to kill them.

Ideally, the bad guys should be always looking for cover, perhaps leap-frogging to my position by holding me down under fire. Thus they should be firing at me from a long distance. This would help the charge problem. In Past Life Regression there are parts of the map where I can practically stand right in front of the bad guy, and he still does not shoot me. Any FPS game out there will have the bad guys shooting at the player from a long way away. Don't you agree?

Thanks again smallg!
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Aug 2014 21:05
Very nice contribution smallg, thanks for share them.

3com
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Aug 2014 19:25
Quote: "Is it possible to change the range the AI will start firing on the player though scripting? I found this command:"


the standard AI script (ai_soldier.lua) just relies on the 'plrvisible' command before it'll trigger combat/firing mode - i don't really know how far this is but i think it's around the same distance as the natural script cut-off range (always on = no).

Quote: " I find the AI just keeps running after me, all of the time, which makes it easy to kill them.
"

i think this is just because it makes keeping the player visible easier and improves accuracy - but mainly because it's very simple AI logic - 1 command and done

Quote: "Ideally, the bad guys should be always looking for cover, perhaps leap-frogging to my position by holding me down under fire. Thus they should be firing at me from a long distance. This would help the charge problem"


this is going to require a very advanced script and a way to detect objects/cover via scripts and also know which side to use as cover etc while also knowing if it's technically a "better" spot than the current... i will have to leave AI logic on this scale to the professionals i'm afraid

a simple duck behind cover and pop-up to fire every now and then is possible (animations permitting)
but in testing it also allows the player to very easily flank the AI (especially as rotation for characters still doesnt work for me) so you would need a very restrictive map/very good cover to make it look natural.

if you have a specific script - i.e. for 1 set area you want the AI to cover - i can try help you out (just give me an email if you don't want to share here, no worries)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
morphtactic
12
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 16th Aug 2014 22:20
I can see this leading to a multiplicity of coding conundrums, you are right. I will have to ponder this for a while. Perhaps I will try out a script, and send it to you for a look... Not sure. Thanks smallg
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Aug 2014 11:53
finally remembered to take a look at
Quote: "TransportToIfUsed(e)"

and have to say it makes a nice teleporter, surprised nobody has mentioned it yet


basically what i have done is set a zone on top of the first teleporter which runs the code and then hidden an object on top of the second which is renamed to be the object i will port to (using the name field on the hidden object and the ifused field on the zone)

now this code is just something i put together in a couple minutes so it wont work as is but it'll let you see the basics (mainly you will need to adjust obect numbers - number 4 in my case "RotateY(4,600)")


life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 6th Sep 2014 01:29
I like your teleporters smallg - nice work.

Have you noticed that when you teleport from (very) high to low ground the player dies? It's OK when you teleport from same height or from low to high. I guess it's moving the X & Z but overlooking gravity fall check for the Y behind the scenes?

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Sep 2014 14:22
Quote: "Have you noticed that when you teleport from (very) high to low ground the player dies? It's OK when you teleport from same height or from low to high. I guess it's moving the X & Z but overlooking gravity fall check for the Y behind the scenes?"


haha so it does, u can kinda compensate for it by giving the player a huge HP before he teleports but yh obviously not an intended side effect

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
almightyhood
10
Years of Service
User Offline
Joined: 9th Oct 2013
Location:
Posted: 6th Sep 2014 18:08 Edited at: 6th Sep 2014 19:05
but good work m8 on the teleporter script

evga GeForce gtx 750 ti boost2.0 2gb gddr5. win 8.1 quad core 4gb ram.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 7th Sep 2014 22:29 Edited at: 7th Sep 2014 22:32
new superman/flash/road runner etc speed drug



*warning can cause harmful side effects*



first you need to place an entity (in my case i used syringes but it should work with anything)

turn off physics

turn on always active

make sure it\'s dynamic (as with all objects running scripts)

enter into the name field any name you like

enter into the ifused field that same name (very important those 2 match and there are no repeats - i.e. you must use different names for each object, even those running this same script)

apply the script



now when you run the game you press e to pickup as normal and hold e for a while (setting changable in script) to activate



note you only need 1 script which you apply to every syringe or entity you want to give this effect (no need to rename or alter the script but you can change the settings which i have highlighted at the top)

also it should be possible to have different settings for different syringes but i didn\'t test that, you should be able to substitute the e with the actual entity number and it\'ll work however - if you wanted different speeds or durations etc)



picture for reference





video





code (sorry its very messy)





note there is no sound but i can add some if you wish.

also collision will be ignored, i can add a very basic system but unless we get a proper collision detection i can't really fix that, sorry

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Sep 2014 12:05
updated the mine script so you can now collect multiple mines and still place them 1 by 1 - also updated the varibles to allow more customisation
(i will keep the original script in the previous post so you can use that version if you prefer)


life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Attachments

Login to view attachments
Tingalls
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 5th Nov 2013
Location: Great Northwest, USA
Posted: 14th Sep 2014 12:58
@ smallg ==> I like your Teleporter code - it works great. I found that you can place an entity anywhere as long as the name is the same as the 'IfUsed' name. And change the properties in the entity to "Spawn at start = no". That way the entity never
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Sep 2014 17:14
sorry yes when i said hidden i was infact meaning a non spawned entity, wasn't very clear but glad you got it working

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Slaur3n
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 16th Sep 2008
Location: Norway
Posted: 19th Sep 2014 23:38
smallg, sent you a PM
Isagabe
9
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 23rd Sep 2014 20:50
Thank you for these. Very helpful to someone like me that does understand coding. I'm more of a conceptual type dude as I write for a living. Well mostly anyway. hah! Thank you.
MXS
Valued Member
15
Years of Service
User Offline
Joined: 10th Jan 2009
Location: Cybertron
Posted: 25th Sep 2014 04:53 Edited at: 25th Sep 2014 04:53
smallg you are awesome it's great to have someone like you on here. thank you so much.

more than what meets the eye.Welcome to SciFi Summer

gtx770 sc acx 2gb gpu boost 2.0

almightyhood
10
Years of Service
User Offline
Joined: 9th Oct 2013
Location:
Posted: 10th Oct 2014 22:17 Edited at: 11th Oct 2014 07:43
on request smallg has made this script for my prisoners lol.. its still a wip but have a watch see what he did lol... such a great guy for this and all the other scripts he does!!!









oh and yes ima crap shot lol...sorry







the code snippet should be a finished 1

THANKS AGAIN SMALLG M8

evga GeForce gtx 750 ti boost2.0 2gb gddr5. win 8.1 quad core 4gb ram.
PM
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 11th Oct 2014 08:09
Yet another great script!
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Oct 2014 11:22 Edited at: 11th Oct 2014 11:25
note: the script is mainly from cybernescence, i just added to that..

http://fpscrforum.thegamecreators.com/?m=forum_view&t=209933&b=2



my script could use some annotations but it's functional



to get it working nicely i recommend hiding a small object at the net area of the hoop (or whatever you are aiming at) and use that object number as the hoop - as we can only check distance and it is calculated from the center of the object (the center of the hoop seen in the video would be at the pole.. not exactly where you want to be getting points )

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 13th Oct 2014 11:14 Edited at: 13th Oct 2014 11:16
@ small g, as you you seem to be awesome at times and objects, can you, or would you create any script that will allow a person to place a trapdoor that

can be set as a timer, weight or switch operated?



as i have a corridor

[img][URL=http://s114
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Oct 2014 14:31
i assume this isn't an animation but rather seperate objects?

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 13th Oct 2014 15:42 Edited at: 13th Oct 2014 15:45
yes separate objects. to tinker with as and whenever. also if you want a trapdoor for free let me know.



i can animate open and shut no problem, like a door is. i presume it would work similar to a door script.

an unquenchable thirst for knowledge of game creation!!!
MXS
Valued Member
15
Years of Service
User Offline
Joined: 10th Jan 2009
Location: Cybertron
Posted: 13th Oct 2014 17:40
hey smallg i can't get the supply create script to work right.i'm using 185. it takes the create after i open it and take item. also what script do you use for the weapon so it won't take the weapon before i open it?

more than what meets the eye.Welcome to SciFi Summer

gtx770 sc acx 2gb gpu boost 2.0

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Oct 2014 18:17
ok trapdoor is done, you can adjust the timing in the init(e) settings, i used the basic door for this so animations are using the fpe file.
if you want multiple trap doors you can just reuse the script however you must apply it to all the doors you want to work

if you know how to work arrays you can also set individual settings for them (i have put an example - just replace the "entity number" with the actual number given by reloaded of the door you want to adjust, you will need to do this for each number you want to have different settings to default) - you can however ignore that and they will all use the default settings if you wish.





life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Oct 2014 18:26
Quote: "hey smallg i can't get the supply create script to work right.i'm using 185. it takes the create after i open it and take item. also what script do you use for the weapon so it won't take the weapon before i open it?
"


no script on any items inside the crate, you pick them up using code in the supply_crate.lua

make sure you are using the correct settings at the top of the script


follow the comments and you should be fine

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 17th Oct 2014 20:42 Edited at: 17th Oct 2014 20:47
target practice script





they also fall down when killed now but i added that after the video.



note: 2 scripts here

apply target_practice_E.lua to all the targets (1 per model)

apply target_practice.lua to any nearby entity (1 only) - or set it always on and apply it anywhere

make sure all are dynamic

make sure all targets have physics turned off if you want them to move (there is also a switch variable in the script to turn movement off - along with settings for speed)

optional - change strength settings (right click on targets) to add more HP to targets



by default targets give 100 points for a kill and -1 if your shot hits but doesnt kill (if strength is high)

*complete misses can't be counted though*



target_practice.lua





target_practice_E.lua



life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Attachments

Login to view attachments
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Oct 2014 19:32 Edited at: 25th Oct 2014 19:32
saw this asked for somewhere so i made a basic wildlife script (works with basic characters, not 100% sure about real wild life as far as animations go but if someone wants to supply a working one i will happily adjust my script so it does - i do not own any)



-set entity to a character in the fpe

-place entity in editor and set to dynamic and apply script (to each entity, they will move in seperate directions)

-adjust settings at top of script to fit your needs (note; alert range and delay etc will be the same for all entities with the script, can adjust it to an array if you so wish of course, or i can do so for you if you need it but as it's based on player range i don't think it's vital)







wildlife.lua





as always, any issues let me know

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Attachments

Login to view attachments
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 25th Oct 2014 21:59
Nice script - how do you get the entity to turn away from the player?

Login to post a reply

Server time is: 2024-03-28 09:24:56
Your offset time is: 2024-03-28 09:24:56