Posts
26
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
I can't think of exactly how I want to word this, but what I'm trying to do is one of 2 things.
First option: Have a set of buttons the player has to buy. Let's say in this case 3 of them. You buy the first one and it makes an button visible that wasn't visible before. Then you buy that one and it makes another button visible and when you buy that one it opens a door.
Second option: Basicially the same as the first, but this time in a random order.
Does anyone know how to do this, I've been trying to do this the last couple of days, but I don't exactly know the best way you excute this, anyone have any ideas?
Yes, first you have to setup buttons with "Trigger_use" on the map and in script you do this:
Now these buttons are randomized!
Next you want to add a function to the button and it goes like this for example:
After you pressed the button you want to hide it and unlock a new button.
.target is the object you have set as target in the kvps in radiant like for example the button model.
and so on
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Thank you for the reply, sorry it took me so long to respond, I was dealing with irl stuff and haven't had time to work on my map. I'm not very knowledgeable when it comes to coding, I have taken a c++ class and a visual basic class, and knew enough to make a B both times, but I don't fully understand alot of the concepts.
Looking at the stuff you can provided, I can tell I need to have the Tigger_use targetname set to buttons, which Im assuming all the models can be any name I want, in my case; "button1", "button2", and "button3".
I can see a couple of sections were you notifiy the play that they pressed the button and then making a new button visible.
I pretty much have a good concept on what you did, but I just have a couple of questions.
The first one is about the section where you said to put the stuff I want, what exactly does that entail. Besides it just being random and making another button visible (which is in the code) and then having it cost an amount to use the trigger, couldn't I just apply that to the trigger use?
Secondly, where do I put this script, would it go in my "mapname.gsc" file or do I have to make a new one, if I am required to make a new one, how do I go about doing that, I tried to make one with notepad++, but couldn't find a way to save it as a .gsc file (I'm assuming, I need an extension?).
This is an example of what you can do:
and you can place it here in YourMapName.gsc
1. Yes maybe you can get the cost of the trigger in radiant but I think it's best to do it in script.
2. It's best to copy a gsc file, clear it and then use it for your own stuff.