The Honey Badger Posted January 22, 2019 Report Posted January 22, 2019 Hi! I'm new to map making and I don't understand programming, I have a problem you might be able to help with: I have made a custom prop of a station platform sign. I would like the clock at the bottom to update every minute. There are a total of 4 platforms, and 3 minutes ingame time to a round, hence this prop has 12 skins. (Essentially each platform destination info with 3 different clock times.) What I want to do is every 60 seconds, add +1 to the 'skin' value attribute on each of the prop entities. I can't find any examples of how to do this and am not smart enough to work out the programming from scratch, can anyone give clear instructions on how to do this? or failing that advice on a better method? Thanks, Quote
Radix Posted January 22, 2019 Report Posted January 22, 2019 (edited) I guess it's Source Engine/CS:GO. So... 1. Give your platform props a name (e.g. "clock1", "clock2", ...). If I got you right, you have 4 different skins for each minute. So set the 4 props up to use the skin you want them to use in the beginning. 2. You will need some additional entities: logic_timer, math_counter, logic_case 3. logic_timer: Set "Refire Interval" to 60 (=1 minute). Go to Outputs. Add a new output with the following parameters: On Timer/*name of the math_counter entity*/Add/1 (Maybe you will need to activate this logic_timer entity at the start of each round via some kind of trigger/logic_auto) 4. math_counter: Give it a name. Go to Outputs. Add a new output: OutValue/*name of the logic_case entity*/InValue 5. logic_case: Give it a name. Case 01: 1; Case 02: 2, Go to Outputs. You will have to create 4 outputs for each case, because each prop uses a different skin at the given time (right?). OnCase01/clock1/Skin/1(*), OnCase01/clock2/Skin/2(*) and so on... (*= or whatever the number of the correct skin is) Maybe I missed something important, or there is an easier solution, but at least this will give you an idea how to make this... Edit: What I wrote before for the logic_case was wrong. It should be correct now. Edited January 22, 2019 by Radix The Honey Badger and a Chunk 2 Quote
esspho Posted January 22, 2019 Report Posted January 22, 2019 (edited) Hi! To do this, you would have to make an animated material (a vtf with multiple frames / the changing numbers on the clock). In the corresponding vmt (aka material script) you would set a "material proxie" named "AnimatedTexture". The animation itself would be triggered by an "env_texturetoggle" entity. You could then trigger that entity every 60 seconds. I hope that helps. edit: After reading your OP again I think you allready have made the different skins. So radix's method would be preferable, I guess Edited January 22, 2019 by esspho Radix and The Honey Badger 2 Quote
The Honey Badger Posted January 23, 2019 Author Report Posted January 23, 2019 (edited) Thanks very much Radix and esspho, (Yes its for csgo), I tried the method by Radix today which has worked! Although I'm struggling with the trigger start as the logic_timer starts within the round warm up instead of at the round start. It's not a major issue as it just means its 5 seconds off a minute of the round time. Quote (Maybe you will need to activate this logic_timer entity at the start of each round via some kind of trigger/logic_auto) What methods are there to get the timer to start at the round start and not during warmup? Edited January 23, 2019 by The Honey Badger Quote
esspho Posted January 23, 2019 Report Posted January 23, 2019 You could use a "logic_auto" with the output "OnMultiNewRound". The Honey Badger 1 Quote
The Honey Badger Posted January 24, 2019 Author Report Posted January 24, 2019 Thanks esspho, I'll give that a try Quote
The Honey Badger Posted February 9, 2019 Author Report Posted February 9, 2019 (edited) Here it is in context! https://steamcommunity.com/sharedfiles/filedetails/?id=1644959932 Me and Gorb have been working on this map for 3 years in our spare time between other projects; its our first map. There is still a lot of work to do, as it stands it is a 'proof of concept'. The feedback so far has been very positive which is a 'confidence shot in the arm' so we are going to continue making improvements and fix issues! Edited February 9, 2019 by The Honey Badger G__R, Radix, esspho and 7 others 10 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.