• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Timer arrays in records

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I want to make a series of timers for a car in my game (one for each of 9 possible weapons). I have my car variables stored in a record. One variable in the record is "WeaponCooldown" which is an array of timers (size 9).

When I start one of the timers it doesn't expire ever. I put in a repeat debug to tell me the time remaining and it always says: 1.01 seconds, even though I started the timer to last only .1 seconds. When I start the time for 1 second it says it has 1 second remaining over and over.

Are there problems with arrays and timers that I'm not aware of?

UPDATE:
I took the arrays out of the record and made a two-dimensional array of timers: the first dimension was the player number (1= player 1, etc.), and the second dimension was the weapon on the car. So array (1,9) was the first player's ninth weapon. In any case, that didnt' work either, and the timer just seemed paused the whole time. I decided to just make my own timers out of reals and a repeat trigger. Long story short, if anyone knows what happened here let me know, but don't put in too much effort unless you're curious as well. I do have a work around for this.
 
Last edited:
Status
Not open for further replies.
Top