Scripts / How to make one trigger zone spawn another?

Author
Message
MrOversea
5
Years of Service
User Offline
Joined: 26th Mar 2019
Location:
Posted: 6th Apr 2019 23:15
Hello everyone. maybe it`s simple question, but i can`t understand how to make one trigger zone spawn another. It is possible at all? It was pretty easy in FPSC, but i`m not an expert in LUA yet ))). By the way, in FPSC spawned entities can work as trigger zone, it`s another way to do what i talking about. In GG i can`t make entities act this way... Hope for your help, and thanks in advance!
Best regards, Oversea.
PM
MrOversea
5
Years of Service
User Offline
Joined: 26th Mar 2019
Location:
Posted: 7th Apr 2019 23:41
I asked, I answered )))
As we all know, the right question already contains the answer ))). A fresh look at the problem made me think and this what i can say now: the Trigger Zone can spawn an Entity. Let`s give this entity a script that will make this Entity work like another Trigger Zone.



So, what we have - the First Trigger Zone spawns an Entity - let`s call it Zone for a sample. Let`s place on our map this Entity called "Zone" (we can use for this any entity of we have), in its "If Used" field we`ll define the "Name" of something that we want to activate, in the "Sound0" we`ll define sound file, which will sounds when our Zone will work. When Player came into a first Trigger Zone, the Entity called Zone will be spawned. When Player gets close (in .lua file we can define, how close) to a Zone, it will react and activate something defined in its "If Used" field. The task is complete ))) (that script you can find in attachment). But i wonder, can we made it with a Trigger Zone instead an Entity - I think that the Trigger Zone is more flexible compare with an Entity.
Best regards, Oversea.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Apr 2019 23:58
You may find this interesting:

https://forum.game-guru.com/thread/218470#msg2584479
Been there, done that, got all the T-Shirts!
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 8th Apr 2019 00:44
I use objects to trigger things as they respect the height they are set at, unlike trigger zone.

I make an obects with a pure black texture and use that with playerdist to to actvate the next piece of the puzzle.
RIP
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

New:
Intel(R) Core(TM) i5-8400 CPU @ 2.81GHz, 12GB RAM, Nvidia gtx1050ti 4gb, Windows 10 Home 64bit, Screen resolution 1920 x 1080. System Passmark 3774




MrOversea
5
Years of Service
User Offline
Joined: 26th Mar 2019
Location:
Posted: 8th Apr 2019 14:22
Thank you, friends! Guess I have found what I looking for.

AmenMoses - I`m already read reccomrnded post. Great work, but I`m afraid it`s too hard for me at this moment - as I wrote, I`m not an expert in LUA yet ))).

Pirate Myke - I don`t thinked about height, thank for your note! Invisible entity is a nice idea. I think we can use any entity with its regular texture if will add in script string "Hide(e)".



In this case any entity will be invisible and no need to create special invisible entity with black texture (I don`know why, but entity with black texture stays visible for me in GG, maybe I did something wrong).

Thanks again and good luck!
Best regards, Oversea.
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Apr 2019 14:53
Quote: "(I don`know why, but entity with black texture stays visible for me in GG"


It has to be pure 100% black, as in RGB 0,0,0 and it should show in the editor but not be rendered in the test game.


Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
MrOversea
5
Years of Service
User Offline
Joined: 26th Mar 2019
Location:
Posted: 8th Apr 2019 17:16
Hello, Belidos!

That`s right. I`ve tried to made texture 128x128 px. with Photoshop - this software correctly works with colours, I guess, saved it as .bmp, then loaded this file into online converter BMP into DDS . DDS file from converter was placed to my entity folder and defined in its .fpe file. At first sight everything is correct, in editor I can see absolutely black entity, but in test game I see the same visible black entity... I`ve tried to use ready texture of standart Invisible Wall - invisible_wall_S.dds or invisible_wall_D.dds - everything is the same...
Best regards, Oversea.
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 8th Apr 2019 18:32
Give the attached a try and see if it works for you.

RIP
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

New:
Intel(R) Core(TM) i5-8400 CPU @ 2.81GHz, 12GB RAM, Nvidia gtx1050ti 4gb, Windows 10 Home 64bit, Screen resolution 1920 x 1080. System Passmark 3774




Attachments

Login to view attachments
MrOversea
5
Years of Service
User Offline
Joined: 26th Mar 2019
Location:
Posted: 8th Apr 2019 19:44
Very strange, but nothing has changed with this entity. I have removed string "Hide(e)"from my script and performed a test. As result, I still see entity in editor and in game test... Maybe something wrong with my system?
However, Thank You!
Best regards, Oversea.
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Apr 2019 19:57
In your entitybank/scenery folder is an invisible wall entity, make a copy of that in a different folder, edit it's .fpe to change collisionmode to 11, then you can use it and scale it to whatever size you like to use with your script.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
MrOversea
5
Years of Service
User Offline
Joined: 26th Mar 2019
Location:
Posted: 11th Apr 2019 14:05
Belidos, Thanks for your advice! I`ve tried this, but result is still the same - visible entity in editor and in game test... Don`t even know, where is error might be...

However, I have script above (which contains "Hide" command and works with any entity), it`s useful enough for me. I think that answer is found and this tread may be sucsessfully closed.

Thanks to everyone who tried to help me!

Best regards, Oversea.
PM

Login to post a reply

Server time is: 2024-03-29 05:41:45
Your offset time is: 2024-03-29 05:41:45