Scripts / Exit level button?

Author
Message
CaptCanada
1
Years of Service
User Offline
Joined: 22nd Jun 2022
Location: Canada
Posted: 2nd Apr 2023 18:03
Hi all

My apologies if this is the wrong section to ask but how can I set up a button that when pressed exits the level?

In my test level, I have a button that have linked to a Win Zone and set it to "Activate Object" , thinking it would trigger the Win Zone, but nothing happens when the button is pressed.

Is there a "built in" behavior or would I have to code it?

Thanks
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 3rd Apr 2023 10:13
The winzone only changes the level in standalone mode, not in test mode.
Anyway, you should get the "win" prompt.
When you say "button" I assume you are referring to a keyboard key, such as "press E and you win"?
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: 3rd Apr 2023 15:29 Edited at: 3rd Apr 2023 15:31
think he is talking about a button model - i.e. a switch behaviour
anyway it should already work fine,
in your winzone behaviour you untick "spawn at start"
in your button with switch behaviour you untick "switched on" (could be that you are missing the button needs to have "switch" behaviour?)
link them together
now you need to press the switch/button to make the zone active
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
CaptCanada
1
Years of Service
User Offline
Joined: 22nd Jun 2022
Location: Canada
Posted: 3rd Apr 2023 16:50 Edited at: 3rd Apr 2023 16:50
Thanks SmallG

I should have stated that I have a switch in my level that is linked to a WinZone. I wanted to be able to activate the switch and have the level end, kinda like the exit buttons/switches in Doom.

Thanks for the your reply and I will try out your suggestion.
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 13th Apr 2023 23:21
There is a winswitch ..
Just Lee has not added it yet
PM

Login to post a reply

Server time is: 2024-05-03 22:24:44
Your offset time is: 2024-05-03 22:24:44