• 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.

Personal "Notebook"

Status
Not open for further replies.
Level 3
Joined
Jun 28, 2006
Messages
28
In a map I am making I want triggers for a "Personal Notebook". I want it to have "add" triggers, "remove" triggers, and "recall" triggers. When I say something like "I would then say", don't think that I have created this system and am sharing it, but it an example of what would happen next. Don't think I made this, I need help making it. Here is an example:

----------
Here is a vision of what I want...
I go into my map in WC III and type in: .add 1 The rocks that are yellow give iron, and the rocks that are purple give steel.
*I know that wasn't realistic but that is just an example*

The .add says that I want to add something to my notes.
The 1 says that it is slot #1 (this goes along with the remove trigger)
The text is what is going to be stored in slot #1

Now that will add a note to my notebook. It will just say something like, "Notes added in slot # (recall what # you said in the command, in this example, 1)

Now let's say I forget what I put in or need to read what I added. I would say something like this, ".read 1"
It would take the information in slot #1 and display it (using the 'Game - Display to (All players) the text: (what I put in for the slot that is being recalled, in this case slot #1


Let's say I didn't like that note or something of that sort so I want to remove it. I would then say: ".remove 1"

It would then go to note #1 (which was: the rocks that are...) and delete it freeing up the space that will allow me to make another #1 note.
----------

IF you have to make triggers such as "slot 1", "slot 2", etc. then I want a maximum of 5 note slots, but if not can there be unlimited?

I am sorry if there is something in the forum that is already like this (I tried searching but not thoroughly) so you can redirect me there if everything matches this.

Thank you to everyone who posts something on this to help me make this system.
 
Last edited:
Level 12
Joined
Apr 27, 2008
Messages
1,228
This very very easy ;)
Unlimited, hm yes, they can.
Simplest thing - Create an array of type string. That would give you a limit of 8091(i think) slots in total, not per player. You can create a more arrays resulting in more slots.
You could even make it so that the map uses gamecache to store the string, if all the slots are used up/the slot number is high. But that is going too advanced for you and for such a thing.
I will post the most simple example in a moment.
This is voluntary work - you do not push people around.
Anyway I made something really simple. But it is too simple - has sort of bugs.
Haven't got enough experience with strings to do this correctly.
Now this requires a number between 100 and 999 in a format of: ".add ### "
And so does ".read ### " and ".delete ### "(I have not tested delete).
Someone who knows how to check if a string(substring) does not contain letters should continue.
 

Attachments

  • notebook.w3x
    14.2 KB · Views: 77
Last edited:
Status
Not open for further replies.
Top