Product Chat / Use the same trigger zone again?

Author
Message
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 8th Mar 2017 11:30
Is it possible to reset a trigger zone?
Normally when you use the trigger zone, the event will happen once.
Is it possible, if the player pass the point again, then the trigger zone will be activated again?
Is it possible in an easy way?

Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Mar 2017 13:36
I think it is. But sadly I can't tell you how. I don't know how to write codes. But I'm sure there people for you that can help.
Modder, Soundtrack Composer and now Game Developer. Well, sort of.

Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, AMD Radeon R9 270X

Youtube:
(Music Channel) The German Music Dude: https://www.youtube.com/user/DeutscherVolker
(Games and Mods Channel ) DK Productions: https://www.youtube.com/channel/UCIqwvScXnJL_zNYqSsfTCqA



Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 8th Mar 2017 13:51 Edited at: 8th Mar 2017 13:55
I think you might need to go into the script that it uses (most likely it's called "plrinzone") and delete the line in the script that says Destroy (e).

I'm not 100% sure, but I think that should do it.

You might want to save an extra copy of the original, or I would save a copy in another folder in the script bank and alter the one that's in the extra folder, then use that one in the trigger zone.

If smallg is around, I think he would know more about it then I would.
PM
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 8th Mar 2017 13:57
Yes, that could be the easy solution... Delete the line destroy
I will try that tonight, thanks.
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Mar 2017 15:15
Going to be more complicated than that I'm afraid and depends what you wanted the zone to do, I'm 99% sure you won't be able to respawn enemies like that for example (unless you didn't kill them).

There needs to be a check or toggle to make sure the script is only activated once otherwise it will repeat endlessly while you're inside...
Other than that you would simply need to check you have left the zone (just an else to the existing 'if'.

So something like this

if player in zone == 1 then
If triggered == 0 then
Add player health
triggered = 1
end
else
triggered = 0
end
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 8th Mar 2017 15:30
Hmmm yes, the idea was to spawn enemies again, if u enter a zone the 2nd time.
But maybe by deleting the destroy command you'll get tooooo many enemies again, because it will not stop.

My idea was:
- player enter trigger zone = spawn group of enemies, but not endless
- player leave zone and enter again trigger zone = spawn again group of enemies...

Would be cool for an 1 level endless shooter...u run around and always have some enemies
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 8th Mar 2017 16:28
just an idea but you create a replica part of the map and teleport the player to mimic re-entering the trigger, then teleport back to the original area when the last enemy is killed? or when leaving through a door get teleported back?
Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 8th Mar 2017 17:26 Edited at: 8th Mar 2017 17:46
I have wanted something like this also, and I'm glad that this question was asked.

I have tried to work with the script and put in what smallg said, but I still can't quite get it to work. I guess we can keep working on it.

Update:
I got the basic function to work once to spawn the enemy characters, but I think it might need a small delay in order for it to trigger again at a later time to keep it from continuously spawning enemies.
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Mar 2017 22:30
I've tried script attached below and it works.
Bassically I've placed 3 soldiers inside a house. Also place a trigguer with the script below, in the entry.
Notice I'm looping around 3-5 since my soldiers are numbers 3,4,5; so you've to change those values by your owns, to fit your needs.

If your soldiers numbers are ie; 4, 75, 122, so you has to delete the for loop statement and use:



instead of the for loop.

Video tomorrow, don't know why lately vid in yt takes long time uploading, than usually, being mpg4 and too shorts.
hth

3com


Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

Attachments

Login to view attachments
PM
Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 9th Mar 2017 03:16
I was wondering if you might use a script that comes with GG called "spawn in zone" (spawninzone.lua)... It seems to work with what you wanted, and there is no destroy line in the script so it keeps working every time you enter the trigger zone.
PM
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 9th Mar 2017 09:39
Thank you guys for your help!
Yesterday I had no time in the evening to try it...
Spawninzone.lua I will try it, thanks.
Don't know why I didn't see it in the folder, I'm getting old
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 9th Mar 2017 21:02
tried it with "spawninzone" it's not really working.
the zombies appear, yes, but only 1x
and the worst they appear 1meter above the ground and stutter... not really walk.
hm....
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
Len the man
9
Years of Service
User Offline
Joined: 12th Jun 2015
Location:
Posted: 9th Mar 2017 22:03
Hi MooKai,

I'm getting old too... LOL...

I have also wanted something that respawns multiple times, but I have had difficulty getting this kind of stuff to work.

You might also want to check this forum link:

https://forum.game-guru.com/thread/207801?page=10#msg2533489
PM
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 9th Mar 2017 22:32
thanks
I will try it, looks good from the video.

smallg is the king of scripting
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 10th Mar 2017 12:11
reusing triguer test



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 10th Mar 2017 13:48
I will try it again on the weekend, maybe I did something wrong... Or the zombies are buggy
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Mar 2017 15:22
It only works until the bodies have been cleared away by the engine unfortunately, so unless you are quick this method won't give reliable results.
It gets a bit more complicated to work around this but it can be done, I did release a script for respawning very recently.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 10th Mar 2017 17:15
I've recently did some script than allowe me using the same ais around the map, so I has not to place a bunch of them, just 4 or 5 different ones, and marker than I did, so you place just the marker where you want the soldier appears or re-appears. (17k againts just 60 polys).

Reusing Soldier Test2



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Mar 2017 18:43 Edited at: 10th Mar 2017 18:57
Quote: "I've recently did some script than allowe me using the same ais around the map, so I has not to place a bunch of them, just 4 or 5 different ones, and marker than I did, so you place just the marker where you want the soldier appears or re-appears. (17k againts just 60 polys).
"

i stand corrected, it is now working, not sure what i did wrong before but i just retried it and can confirm it works.
i know Lee did say he was going to fix a character spawning issue a little while ago so maybe this was just not working before?

edit, got asked for this script recently and i think it's useful so i'll share it here as it's on the subject of spawning.
allows you to replace all enemies back to their original locations if you die - both those that you have killed and those still alive (but if you reach a checkpoint then it will remember all enemies that are dead and not spawn those).
set it on a static = no, always active = yes object
AI can be any but they must include the ai_bot_state[e] variable in their script somewhere (stock AI already has it).
AI do not need to be always active (doesn't matter either way).
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
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Mar 2017 16:27
Quote: "i know Lee did say he was going to fix a character spawning issue a little while ago so maybe this was just not working before?"


I sent him an old script I did to re-spawn enemies a month or two ago. They re-spawned but could get stuck in states. He said he had to add a few new things in for it to work. When I last tried it, about a week ago, it worked fairly well, but has a similar issue to the Zombies in the video I posted recently, moon walking until it reaches the point it thinks it's at.

It will probably be fine when the AI issues are sorted. Be nice, that script for re-spawning is about a year and a half old, I gave up on it at the time.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 13th Mar 2017 10:17
Uhhh... Don't had much time to play around with GG last weekend.
I hope I've some time during this week, to test the spawn scripts
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM

Login to post a reply

Server time is: 2024-11-24 13:49:29
Your offset time is: 2024-11-24 13:49:29