• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Requesting Assistance from any/all Experienced Coders

Status
Not open for further replies.
Level 4
Joined
Aug 17, 2007
Messages
36
I'll try to keep this as short and simple as possible because I realize you guys have better things to do than help me with this.

A while back, I posted an unfinished Mario Kart map here at the hive. I've forgotten about it until recently and decided that I would like help making it more playable.

Here's the problem--

I know very little jass and what jass I do know helps me very little, and I am positive that continuing to code in the gui will only hinder map further.

My biggest issues are with my usage of the

  • Time - Every X.XX seconds of the game
and

  • Wait X.XX seconds
  • Run This Trigger
Where X.XX in most cases is 0.01

So here's what I would like help on. I need a way to move the karts that doesn't leak as much as this:

  • Events
  • Time - Every 0.01 seconds of the game.
  • Actions
  • Unit - Move UNITMOVE1 instantly to ((Center of (Region centered at (Position of UNITMOVE1 with size (5.00, 5.00))) offset by (X1, Y1))
  • Unit - Make UNITMOVE1 face ((Center of (Region centered at (Position of UNITMOVE1) with size (5.00, 5.00))) offset by (X1, Y1)) over 0.00 seconds
---

And as far as turning goes, when a player presses and holds left, it turns on the following trigger:

  • Events
  • Time - Every 0.01 seconds of game time
  • Actions
  • If ((X1 Greater than 0.00) and (Y1 Equal to 0.00)) then do (Set X1 = 19.75) else do (Do nothing)
  • If ((X1 Greater than 0.00) and (Y1 Equal to 0.00)) then do (Set Y1 = 0.25) else do (Do nothing)
  • If ((X1 Less than 0.00) and (Y1 Equal to 0.00)) then do (Set X1 = -19.75) else do (Do nothing)
  • If ((X1 Less than 0.00) and (Y1 Equal to 0.00)) then do (Set Y1 = -0.25) else do (Do nothing)
  • If ((Y1 Greater than 0.00) and (X1 Equal to 0.00)) then do (Set Y1 = 19.75) else do (Do nothing)
  • If ((Y1 Greater than 0.00) and (X1 Equal to 0.00)) then do (Set X1 = -0.25) else do (Do nothing)
  • If ((Y1 Less than 0.00) and (X1 Equal to 0.00)) then do (Set Y1 = -19.75) else do (Do nothing)
  • If ((Y1 Less than 0.00) and (X1 Equal to 0.00)) then do (Set X1 = 0.25) else do (Do nothing)
  • If ((X1 Greater than 0.00) and ((X1 Less than 20.00) and (Y1 Greater than 0.00))) then do (Set X1 = (X1 - 0.25)) else do (Do nothing)
  • If ((X1 Greater than -20.00) and ((X1 Less than 0.00) and (Y1 Greater than 0.00))) then do (Set X1 = (X1 - 0.25)) else do (Do nothing)
  • If ((X1 Greater than 0.00) and ((X1 Less than 20.00) and (Y1 Less than 0.00))) then do (Set X1 = (X1 + 0.25)) else do (Do nothing)
  • If ((X1 Greater than -20.00) and ((X1 Less than 0.00) and (Y1 Less than 0.00))) then do (Set X1 = (X1 + 0.25)) else do (Do nothing)
  • If ((Y1 Greater than 0.00) and ((Y1 Less than 20.00) and (X1 Greater than 0.00))) then do (Set Y1 = (Y1 + 0.25)) else do (Do nothing)
  • If ((Y1 Greater than -20.00) and ((Y1 Less than 0.00) and (X1 Greater than 0.00))) then do (Set Y1 = (Y1 + 0.25)) else do (Do nothing)
  • If ((Y1 Greater than 0.00) and ((Y1 Less than 20.00) and (X1 Less than 0.00))) then do (Set Y1 = (Y1 - 0.25)) else do (Do nothing)
  • If ((Y1 Greater than -20.00) and ((Y1 Less than 0.00) and (X1 Less than 0.00))) then do (Set Y1 = (Y1 - 0.25)) else do (Do nothing)
This seemingly complicated trigger is actually really simple. It just turns the kart 0.25 polar degrees to the left for every 0.01 second that the left arrow key is held down. It turns them the opposite way when the right arrow key is held down.

The green shells move in a similar fashion, so the movement will need to move a variable unit and not a specific unit.

I guess, if I've somehow muddled you in my crazed rantings above, I'll sum it up for you--

I need some way to remove the leaks from my map that cause slowdown and eventual inconsistencies between players. I'm not sure if the triggers above are entirely leak proof and as such, I posted them for you guys to look at.

If you see anything in the triggers of my map (the download is available below) that will make it leak, than please bring it to my attention and, if you can, provide me with a way to remedy it.

All help that is given will go in the map credits, no matter how small the help is. If there is nothing that anyone can do, I'm more than willing to drop this project to work on something productive.

Thanks for taking the time to read the pleadings of this poor, helpless sap.

The aforementioned map is available for download here:
http://www.hiveworkshop.com/resources_new/maps/4961/
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
Wow... Hope you don't take any offence of this, but stuff's really screwed up in your triggers :)

I don't have heaps of time now, but I guess I could help you out (step by step), and I'm sure some others will help you as well.
1) Should I just make a list of stuff that goes wrong / could be improved and make you do it or
2) Fix the stuff myself? (well... I might do a little bit, but I'm not planning to redo the map :p)

To answer the most basic concerns: There's a sticky thread (on this forum I believe) called "Things that leak".
One of the things that leak are POINTs. A point is basically a location, for instance: Position of (UnitMove2).

In one of your triggers you have this:
  • Unit - Move UnitKart1 instantly to (Position of UnitMove1), facing (Facing of UnitMove1) degrees
This leaks a point, namely Position of UnitMove1.
To fix it: create a Point variable in the variable editor (cntr + B)
then change the trigger into:
  • Mytrigger
  • Set MyPointVariable = Position of UnitMove1
  • Unit - Move UnitKart1 instantly to MyPointVariable, facing (Facing of UnitMove1) degrees
  • Custom script: call RemoveLocation(udg_MyPointVariable)
Then another thing: Many of your triggers are very inefficient. For instance: you have 8 triggers for the 8 karts. You could make this into 1 trigger using arrays and loops.
 
Level 4
Joined
Aug 17, 2007
Messages
36
No offense taken, I appreciate the comments.:thumbs_up:

As for the helping, if you would, just fix one of each type of trigger that is obviously gui newb material, as each type of trigger has numerous clones, and I can fix the rest based on the one you give me.

For those that you don't have time or can't fix, I'd appreciate a list of what could be fixed--but if that's not possible, I fully understand.

As for the arrays and loops, I completely agree. I didn't discover what arrays actually were until halfway through making the map.

Again, I really appreciate the constructive criticism and was expecting the comments to be much more harsh. If you want to edit the map, I'll wait to fix the point leak until you upload an edited version. If you don't want to edit it anymore, I'll get to work on that and upload an updated version here.

Anyone else's comments are still appreciated--I want to make this map as amazing as possible, and the more input I get, the better grasp I can get on the severity of my newbacity.
 
Status
Not open for further replies.
Top