• 🏆 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!

Need a Save/load Script/Trigger

Status
Not open for further replies.
Level 20
Joined
Feb 23, 2014
Messages
1,264
It might be a silly question, but OP - are you certain that you have the "Automatically create unknown variables when pasting trigger data" box in the Editor Properties checked?
 
Level 3
Joined
Jun 22, 2016
Messages
31
I did nothing wrong, I copied the triggers perfectly but they all gave errors like every other trigger that uses jass at all on here because of wc3's new update that broke even my custom triggers that I can't fix because it was a friend that made it for me and doesn't want to work on wc3 anymore.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
Nothing in the spell section that is approved "is not working"
Unless it is very old. In which case it might become rejected if incompatible with modern WC3.
I did nothing wrong, I copied the triggers perfectly but they all gave errors like every other trigger that uses jass at all on here because of wc3's new update that broke even my custom triggers that I can't fix because it was a friend that made it for me and doesn't want to work on wc3 anymore.
Are you using normal WorldEdit? If so maybe try with WEX since a lot of stuff require JASS extensions and JNGP does not work anymore.
Otherwise you will need to post the map for people to identify the JASS errors.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
Assuming only 1 hero per player, map heroes to players using a unit array. Then in response to the player saying the appropriate command you calculate the amount of stats to add. Such calculation is usually something like {resource / some constant number}. You then work out the amount of resources consumed, which is {stats to add * some constant number}. Remove the resources consumed from the players appropriate resource amount. Add to the player's hero, fetched from the player to hero mapping array, the amount of stats to add. One might need some intermediate integer variables. It is recommended that integer variables are used as both stats and resources are integer values.
 
Status
Not open for further replies.
Top