Scripts / How can erase the Objectives on the radar ?

Author
Message
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 14th Dec 2015 21:52 Edited at: 14th Dec 2015 22:00
How can be erased the Objectives on the radar (the yellow dots) after that objectives was solved ?
Need one example please.
I've used this script, but the yellow dot remain on the radar after the laptop was collected...
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 15th Dec 2015 01:38
Add this to the radar.lua to make the objectives sprites disappear from the radar once they are destroyed or achieved.

if g_Entity[radarObjectives[c]]['health'] <= 0 then
DeleteSprite ( radarObjectiveSprites[c] )
end

it goes in this section of the script...




Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 15th Dec 2015 09:29
In my script example, the Commander's laptop must be "collected", so not work with that "health <=0"
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Attachments

Login to view attachments
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 15th Dec 2015 10:12
Here is my radar modified script to can delete sprite if the g_entity health is 0 (zero)

And this script doesn't work for collected or killed (explode) radar objectives...
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 15th Dec 2015 10:39 Edited at: 15th Dec 2015 11:09
Quote: "In my script example, the Commander's laptop must be "collected", so not work with that "health <=0" "


Hi,
I copied it from an old version of the modified script..
It should be like this then..

Add this to the radar.lua to make the objectives sprites disappear from the radar once they are destroyed or achieved



The collectable item should have a script similar to the attached collectable_objective.lua
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 15th Dec 2015 11:31
YEESSS !!! Working fine now ! Many thanks @perelect !
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 15th Dec 2015 16:49 Edited at: 15th Dec 2015 17:13
I put here the correct radar.lua (with objectives) script by @perelect for all the forum users:



And one of using example for entity as objective who must be detonate:


And here other one entity objective who must be collected:
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 15th Dec 2015 17:45
This works great! thank you!
PM
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 15th Dec 2015 17:57 Edited at: 15th Dec 2015 17:58
And one short video as example, with two enemies (red dots) and two objectives (yellow dots) on the radar :

Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 15th Dec 2015 18:06
Pink Panther wrote: "This works great! thank you!"

Indeed, works great. Enjoy !
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 19th Dec 2015 16:36 Edited at: 19th Dec 2015 16:45
@perelect you forgot to use (check) spawn for new enemies waves (wave0, wave1, wave2 etc.) in the "radar_mod.lua"

Without this part of script, the radar doesn't show the new enemies if it's later spawned in the game level.
Here is one who include the new enemies check:

P.S. I think this part of the script must be adapted too for the new friends or objectives in game after their was later spawned
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 19th Dec 2015 17:39
One short video example here and a very short specifications on the attached picture below
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Attachments

Login to view attachments
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 19th Dec 2015 18:42 Edited at: 19th Dec 2015 19:03
IMPORTANT NOTE : You will must finish to build all of your game level BEFORE add any supplementation
(like radar_mod, objectives, new enemies or friends spawn) !!!
After you check your map in the "regular" function (and save it with separate name), you can add in this order:
1. New trigger spawn (wave0, wave1 etc.) and after every new trigger put hes new (wave0, wave1 etc. enemies (and friends or objectives) .
2. After you will finished to add all extra, can put one entity as radar_mod !!!! Then test if working well all together.
3. After all those, you can test if work good with light (F2, F3 or F4).
Do not forget to save every of your test with other name: test1-withF2, test1_F3 as example, etc.
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 21st Dec 2015 09:45
Thanks @perelect
Later edit: On my game map works only for the first enemies spawn (wave0).
For wave1, wave2, wave3 etc. the enemies is spawned but doesn't show them on the radar
I have no clue where I'm wrong....
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Attachments

Login to view attachments
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 21st Dec 2015 18:48 Edited at: 21st Dec 2015 19:15
perelect wrote: "The problem was with the delete sprite command
so you need to replace... "DeleteSprite ( radarObjectiveSprites[c] )" with "SetSpritePosition ( radarObjectiveSprites[c], 200 , 200 ) "

Indeed, there was the problem
For the friends AI doesn't need (maybe just if their is killed in game), this modified script must be used
just to show the new enemies on the radar after the next spawn was activated (wave0, wave1, wave2 etc. in my map, as example).
So, I put here the last "radar_mod.lua" by @perelect for all there:



Many thanks @perelect !
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 22nd Dec 2015 15:27
See here how is working https://forum.game-guru.com/thread/208781#msg2536331
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Login to post a reply

Server time is: 2024-12-22 10:46:42
Your offset time is: 2024-12-22 10:46:42