Product Chat / Avoiding enemy sub's aint EZ !

Author
Message
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 8th Sep 2016 03:07 Edited at: 8th Sep 2016 04:22
Not a WIP yet....Just showing you what I'm up-to! Need help on scripts so enemy subs will fire upon you and Enemy subs are appearing on sonar! Using "tank lua" and "Classic Radar Lua"...if you can help I need subs to fire upon player and I need enemy subs to show up on "Classic-Radar"...using tank.LUA from here in the forums....to help please follow this thread..."https://forum.game-guru.com/thread/216141"

[href]null[/href]
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 8th Sep 2016 03:18 Edited at: 8th Sep 2016 03:19
I would tell you how cool I thought that was, but unfortunately comments were disabled!
Desktop: i7 4770@3.4Ghz, 12GB RAM, Win 10/64, GeForce GTX 1080, 1TB SSD, 1TB HDD; Laptop: i7 4800MQ@2.7Ghz, 16GB RAM, Win 10/64, GeForce GTX870M , 1TB SSD.
PM
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 8th Sep 2016 03:37
I need Help.....
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
devlin
10
Years of Service
User Offline
Joined: 12th Feb 2014
Location:
Posted: 8th Sep 2016 08:43
looks nice cool project,
do not know much on scripting try searching in the
script forum, you might find some help there.
lots of scripts on there you might be able to adapt,
you probably already know you need a firespot.

look at this page or similar, https://forum.game-guru.com/thread/211321
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Sep 2016 10:57
if the player is not inside an object himself then a firespot should work fine, all you need to do in the script then is call FireWeapon(e) - although this doesn't work correctly with the RPG for me, it only ever fired once when i wrote the tank script.
if that doesnt work you can always create your own missiles and move those as you would a normal entity, then detect hits on distance to the player, i did this method for honkeyboy's games - it just doesn't account for obstacles so it works fine for open areas like water or space.

for making them appear on the radar all you need to do is make sure they have ai_soldier_state[e] in their script somewhere, the radar checks this to confirm they are enemies.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Sep 2016 15:15
Check out my video on adding extra items to your radar. I show how to alter the default script to do this in this.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 8th Sep 2016 15:57
Thanks DVader and smallg......

@ smallg!.....ai_soldier_state[e] is in the tank.lua yet still no blip on "Classic" radar ??? I will go over everything in Dvader's video this weekend and see if I can get it to work on the regular radar but I do like the green in the Classic radar version!

as for firing weapon I will try running the sub .x files through blender and see if I can figure this out! Never done this before so shooting from the hip...so to speak
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Sep 2016 16:28
Quote: "I will go over everything in Dvader's video this weekend and see if I can get it to work on the regular radar but I do like the green in the Classic radar version!"

You can change it to any colour you want, it's all in the script and the images used. I changed the colour so it would not interfere with the default green blobs You could have little submarines instead if you wanted The coloured blob is just a image, so you just change that. I think I went over changing images as well in the video, the basics anyway.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Sep 2016 22:00
Quote: "ai_soldier_state[e] is in the tank.lua yet still no blip on "Classic" radar ?"

it's not, i used state[e] rather than ai_soldier_state[e] but adding it is as simple as 1 line - don't replace but add it as extra like so
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 9th Sep 2016 12:49
Cool submarine game!
Julian
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 9th Sep 2016 19:46
I still have those scripts to hand in fact i put them up as a pack on the free models and media ShN33Ky
https://forum.game-guru.com/thread/215480
All you'd need to do is change the speeder for your sub, and add the flyspeeder script missiles were in the pack but if you need any making let me know. im sure i can rattle up some torpedoes
Intel i5 4950 Quad core 3.3ghz
8gb Ram
Nvidia NVS 315 1gb
and a well fed mouse on a wheel

When Reality is broken. Game designers can fix it and make it more realistic
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 10th Sep 2016 17:04
Appreciate so much help from so many......

@smallg= Added the lines in LUA but still no blip on either "classic" radar or regular radar! Here is what I'v done to the tank.lua also calling sound in this script!

Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Sep 2016 18:18
ok, that's very different to mine but it should look like this (fixed yours)
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
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 10th Sep 2016 19:11 Edited at: 10th Sep 2016 19:18
Thanks again smallg.....there was an unexpected error in what you sent me ( "end" to close to "if" at line 21) but I was able to fix that and now have me some shaweet sonar blip action....



time to hunt some enemy submarines and try to get them to shoot me...

@ Honkeyboy.....yes I found you speeder thread a while back and torpedo's would always come in handy ! TY for your input
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Sep 2016 10:35
classic_radar.lua only plots 'enemies' when:

1) ai_soldier_state[e] ~= nil
2) g_Entinty[e] ~= nil
3) g_Entity[e].health > 0
4) GetEntityVisibility(e) == 1

Or at least it did when I wrote it

Add a prompt call to print those values and that will show you what is missing.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-09-28 23:07:58
Your offset time is: 2024-09-28 23:07:58