• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Triggers? A.I.s? Which should I use in this scenario?

Status
Not open for further replies.
Level 7
Joined
Sep 24, 2008
Messages
281
Hello Hiveworkshop. In the design of my current map, a remake of COD5's Nazi Zombies, I seem to be encountering some frustration with the zombies system. Here's what I have developed for the level systems:
Essentially, once an integer variable, initially set at twenty, becomes 0, the game will wait 15 seconds, display the text, level (level integer variable, which is increased by an integer of 1 each level.) The zombie spawn variable, which is now only 0, is increased by an increasing 20+5, 25+5, and so on. Any advice on how to make it increase by 5 per level would be helpfull.
Now, my real problem is that the barricades are a destructible. Purely for aesthetic purposes, though, as buildings cannot be rotated. How would I make it so that after they attack the barricades, they can go in and attack?

Thanks for reading, and post if anything needs clarification:grin:

Note: perphaps it would be easier to base the barricade off of the pocket factory, which can be freely rotated, and simply make the zombies have an attack move? I'll be testing this.
 
Level 7
Joined
Sep 24, 2008
Messages
281
You need:
  • Actions
    • Set ZombieSpawn = (ZombieSpawn + 1)

I'm not quite sure what you mean by that... anyway, here's what I've got so far:
Edit: how can I make it so that it displays a variable's value in a text message (i.e. congradulations, level completed, now moving on to level (current value of "levelvariable")
 

Attachments

  • Nazi Zombiesv2.w3x
    397.6 KB · Views: 45
Level 4
Joined
Nov 23, 2007
Messages
113
how can I make it so that it displays a variable's value in a text message (i.e. congradulations, level completed, now moving on to level (current value of "levelvariable")

Use concatenate strings:

  • Game - Display to (All players) the text: (Congratulations, level completed, now moving on to level + (String((levelvariable))))
 
Level 7
Joined
Sep 24, 2008
Messages
281
Use concatenate strings:

  • Game - Display to (All players) the text: (Congratulations, level completed, now moving on to level + (String((levelvariable))))
So if my level integer variable was ZombieLevel, then I would say in the message: "level completed, moving on to level (String((ZombieLevel))))
Is that right? I'm not quite sure what a concatenate string is....:confused:
 
Level 4
Joined
Nov 23, 2007
Messages
113
Correct. Just replace the var name I used with the one you've created.

To answer your question regarding concatenate string:
Since I'm not sure how proficient you are with the WE GUI or programming, I'll explain it in detail. Sorry if you already know most of this.

Strings are a set of characters or words, like this sentence is a string of characters and words (because they are "strung" together - hence the term).

The "String()" function you see in the GUI (or I2S() in jass) converts an integer numeric value to a string of characters (stored as a string of bytes) so it can be printed. If you have a number such as 1234, it is stored as a number (in binary 00000100 11010010) typically using 2 bytes, called a "word". However, trying to print those 2 bytes would not produce the text "1234". Hence the need to convert it to each digit's character value. This requires 4 bytes instead of 2 to store its character representation.

Concatenate just means to chain more than one thing together. When you concatenate the string "the number is " and String(1234) you are first converting 1234 to a string then adding it to the end of the sentence to form the complete sentence "the number is 1234".

So in the World Editor you would do the following (in short):
1. Select new Action
2. Select "Game - Text Message (Auto Timed)
3. Click on the Text link
4. Select "Concatenate Strings" from the function drop-down box
5. Click on the String 1 link and type in "Congratulations, level completed, now moving on to level " (note the trailing space to separate the 2 strings) minus the quotes, and click OK.
6. Click on the String 2 link and select "Conversion - Convert Integer To String" and select your variable ZombieLevel from the Variable list, and click OK, OK, OK, OK.

This produces the following jass code:
call DisplayTextToForce( GetPlayersAll(), ("Congratulations, level completed, now moving on to level " + I2S(udg_ZombieLevel)) )

The I2S() function above is the function that converts a number (integer) to a string. This is why jass is generally quicker because it requires less steps to accomplish the same task (you can just type the above jass code instead of all that clicking). However, for jass beginners it may be slower at first because it takes a while to learn the function names and syntax etc.

Hope that helps.
 
Last edited:
Level 7
Joined
Sep 24, 2008
Messages
281
Correct. Just replace the var name I used with the one you've created.

To answer your question regarding concatenate string:
Since I'm not sure how proficient you are with the WE GUI or programming, I'll explain it in detail. Sorry if you already know most of this.

Strings are a set of characters or words, like this sentence is a string of characters and words (because they are "strung" together - hence the term).

The "String()" function you see in the GUI (or I2S() in jass) converts an integer numeric value to a string of characters (stored as a string of bytes) so it can be printed. If you have a number such as 1234, it is stored as a number (in binary 00000100 11010010) typically using 2 bytes, called a "word". However, trying to print those 2 bytes would not produce the text "1234". Hence the need to convert it to each digit's character value. This requires 4 bytes instead of 2 to store its character representation.

Concatenate just means to chain more than one thing together. When you concatenate the string "the number is " and String(1234) you are first converting 1234 to a string then adding it to the end of the sentence to form the complete sentence "the number is 1234".

So in the World Editor you would do the following (in short):
1. Select new Action
2. Select "Game - Text Message (Auto Timed)
3. Click on the Text link
4. Select "Concatenate Strings" from the function drop-down box
5. Click on the String 1 link and type in "Congratulations, level completed, now moving on to level " (note the trailing space to separate the 2 strings) minus the quotes, and click OK.
6. Click on the String 2 link and select "Conversion - Convert Integer To String" and select your variable ZombieLevel from the Variable list, and click OK, OK, OK, OK.

This produces the following jass code:
call DisplayTextToForce( GetPlayersAll(), ("Congratulations, level completed, now moving on to level " + I2S(udg_ZombieLevel)) )

The I2S() function above is the function that converts a number (integer) to a string. This is why jass is generally quicker because it requires less steps to accomplish the same task (you can just type the above jass code instead of all that clicking). However, for jass beginners it may be slower at first because it takes a while to learn the function names and syntax etc.

Hope that helps.

Alright, thanks. Do you have any ideas for the attack system?
 
Level 4
Joined
Nov 23, 2007
Messages
113
Alright, thanks. Do you have any ideas for the attack system?

Hi,
I'm not sure I really understand what it is you are trying to accomplish or what technical issues you are facing.

Other than making a bunch of maps for my wife and I to play against the computer and in that process, rewriting in vJass all the melee AI to fix the Blizzard AI bugs and providing the AI with more strategies, I'm not really that familiar with all the different types of gameplay map styles (eg. Nazi Zombies, hero arena, etc) as many others are around here.

My forte is really programming/AI/physics (and in a whole other genre for a small game developer designing racing sims) so my WC3 map knowledge is rather limited, and unfortunately, I'm not much help when it comes to map specifics or the different types of gameplay used in the community.

The Zombie calculation issues I might be able to assist you with if I had a better understanding of what you are trying to accomplish. However, for the "barricades are a destructible" type issues, there are many people around these forums with that type of knowledge who could better assist you.

Sorry I can't be of more help.
 
Last edited:
Status
Not open for further replies.
Top