I was looking at the JJCP JASS codes and i want to know what some of the things are....
Question 1)
what is the difference between a force and a group?
in the globals, a group called heal and a force called cheater is made
Question 2)
what exactly is "cache"? (what does it store)
is it like a variable?
google defined it as "a hidden storage space"
Question 3)
What is the native function "TriggerRegisterPlayerChatEvent"?
i see it a lot in the JJCP but i don't quite understand what it is used for
also, in the Q&A tutorial (http://forum.wc3edit.net/triggering-edi ... t7053.html)
there's a function called "GetTriggerRegisterPlayerChatEvent" (in the Question Question: What are the common anti-cheat protections and how do i remove them?)
I'm assuming it is a native becuase he doesn't tell us to declare in the globals or anything....but since i cant find it in the native list, i'm also assuming it is a typo....but...i'm not sure...
Question 4)
What is a widget? I remember seeing it sometimes but can't remember exactly where....
Summary:
What is the difference between a group and a force?
What is cache, what is it used for, and what does it store?
What does the native function "TriggerRegisterPlayerChatEvent" do?
Is "GetTriggerRegisterPlayerChatEvent" a typo?
What is a widget?
Thanks for reading
JASS questions
Moderator: Cheaters
-
- Senior Member
- Posts: 127
- Joined: March 27th, 2010, 2:32 pm
Re: JASS questions
Question 1
Force = group of Player's
Group = group of Unit's
Question 2
Cache is a file, which can be used to store basically anything, as variables, units, items, etc. It does not expire after the map is closed and single cache can be used by multiple maps. Normally people use it to store settings (multiplayer games) or player data (singleplayer games)
Question 3
TriggerRegisterPlayerChatEvent adds a chat event to the specified trigger (so it can be executed after specified player types specified phrase).
TriggerRegisterPlayerChatEvent(Trigger, Player, String, Precise)
Trigger - trigger to add the event to (create it before calling this function)
Player - player to trigger the trigger. If you want multiple players to be able to use the trigger by typing the command, call this function multiple times (or use loop).
String - string to be matched. For example, "-fox"
Precise - if set to false, Trigger will run even if the player typed the String as part of message (for example, "Hello -fox-world").
I don't have the answers for your other questions.
Force = group of Player's
Group = group of Unit's
Question 2
Cache is a file, which can be used to store basically anything, as variables, units, items, etc. It does not expire after the map is closed and single cache can be used by multiple maps. Normally people use it to store settings (multiplayer games) or player data (singleplayer games)
Question 3
TriggerRegisterPlayerChatEvent adds a chat event to the specified trigger (so it can be executed after specified player types specified phrase).
TriggerRegisterPlayerChatEvent(Trigger, Player, String, Precise)
Trigger - trigger to add the event to (create it before calling this function)
Player - player to trigger the trigger. If you want multiple players to be able to use the trigger by typing the command, call this function multiple times (or use loop).
String - string to be matched. For example, "-fox"
Precise - if set to false, Trigger will run even if the player typed the String as part of message (for example, "Hello -fox-world").
I don't have the answers for your other questions.
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
Re: JASS questions
1) ok thanks
2)
so....in JJCP....the first line is gamecache CACHE=InitGameCache("KeyBindings.w3v")
where is the keybindings.w3v file made/saved? does it delete itself?
and in the native functions "GetStoredString" and "StoreString", the second thing the function takes is "String MissionKey"
What is that missionkey supposed to be?
3)
oh...basically it's like TriggerAddAction and TriggerAddCondition....except it's adding an event to trigger the trigger...
When the map starts and function main is executed (assuming function main runs as map initialization), the event to detect "-" is added to the ICHEATS trigger...and the action CheatUse is added to the ICHEATS trigger as well...
when WC3 detects "-" in someone's chat, the CheatUse function runs as the action of the ICHEATS trigger....
that is when it checks whether the person wrote the activator and is not in the force CHEATER....if both is true, the person's name is displayed to the force CHEATER, the person is added to the force CHEATER, an event to trigger the trigger CHEATS is added to detect another "-" so the actual cheats work, and finally, the player that activated the cheats is shown the "cheats activated" text.
Back in function main, a condition from the function Cheatz0r was added to the trigger CHEATS to make sure only those in the force CHEATER can use the cheats and the action DirectCheat was added to the trigger CHEATS to define what the cheats will do....
Becuase at the activation of the cheats, the player was added to the force CHEATER, the condition is fulfilled. Also, the event to trigger the trigger CHEATS was added only for the player that activated the cheats and so, the event can be detected and then when the player inputs a cheat command, the cheat is carried out successfully.
This is from JJCP....and I'm pretty sure how it works....Is this correct so far? (i'm guessing about the function main)
Summary:
Question One: answered by YellowAfterlife and i understood.
Question Two: answered by YellowAfterlife and i understood it but asked more in depth and questioned about the missionkey string
Question Three: answered by YellowAfterlife and i understood but i also put up a wall of text of how JJCP is activated and asked for verification.
Question Four: not answered, still confused about what a widget is
2)
so....in JJCP....the first line is gamecache CACHE=InitGameCache("KeyBindings.w3v")
where is the keybindings.w3v file made/saved? does it delete itself?
and in the native functions "GetStoredString" and "StoreString", the second thing the function takes is "String MissionKey"
What is that missionkey supposed to be?
3)
oh...basically it's like TriggerAddAction and TriggerAddCondition....except it's adding an event to trigger the trigger...
When the map starts and function main is executed (assuming function main runs as map initialization), the event to detect "-" is added to the ICHEATS trigger...and the action CheatUse is added to the ICHEATS trigger as well...
when WC3 detects "-" in someone's chat, the CheatUse function runs as the action of the ICHEATS trigger....
that is when it checks whether the person wrote the activator and is not in the force CHEATER....if both is true, the person's name is displayed to the force CHEATER, the person is added to the force CHEATER, an event to trigger the trigger CHEATS is added to detect another "-" so the actual cheats work, and finally, the player that activated the cheats is shown the "cheats activated" text.
Back in function main, a condition from the function Cheatz0r was added to the trigger CHEATS to make sure only those in the force CHEATER can use the cheats and the action DirectCheat was added to the trigger CHEATS to define what the cheats will do....
Becuase at the activation of the cheats, the player was added to the force CHEATER, the condition is fulfilled. Also, the event to trigger the trigger CHEATS was added only for the player that activated the cheats and so, the event can be detected and then when the player inputs a cheat command, the cheat is carried out successfully.
This is from JJCP....and I'm pretty sure how it works....Is this correct so far? (i'm guessing about the function main)
Summary:
Question One: answered by YellowAfterlife and i understood.
Question Two: answered by YellowAfterlife and i understood it but asked more in depth and questioned about the missionkey string
Question Three: answered by YellowAfterlife and i understood but i also put up a wall of text of how JJCP is activated and asked for verification.
Question Four: not answered, still confused about what a widget is
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: JASS questions
the cache in JJ's CP is for the binding system. so you can bind the arrows to do certain stuff.
Its rather complicated so I wont explain the whole process. but if you want to understand how a cache works, here is what I suggest you do.
1) make a map
2) make a hero of some sort
3) make some creeps that he will fight and level up
4) make a trigger that when you write -save it will store inside a game cache the hero
5) make some more creeps to level him up again
6) write -load to make your hero what it was.
it looks kinda weird. if you want a better example.
open war3.mpq using MPQMaster or any other kind of MPQEditor.
extract some campaign maps
open them in WE
now you will see that at there are triggers at the end of the map that store the heroes in a gamecache and in the new map loads them so it will still have the same level and items etc...
Its rather complicated so I wont explain the whole process. but if you want to understand how a cache works, here is what I suggest you do.
1) make a map
2) make a hero of some sort
3) make some creeps that he will fight and level up
4) make a trigger that when you write -save it will store inside a game cache the hero
5) make some more creeps to level him up again
6) write -load to make your hero what it was.
it looks kinda weird. if you want a better example.
open war3.mpq using MPQMaster or any other kind of MPQEditor.
extract some campaign maps
open them in WE
now you will see that at there are triggers at the end of the map that store the heroes in a gamecache and in the new map loads them so it will still have the same level and items etc...
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
Re: JASS questions
mmmm i understand what a cache is used for and that it can store a variety of stuff...
from what you said...i gather that the cache is stored/made/saved in the war3.mpq file?
Also, since the keybindings dont transfer over from one cheated map to another, im assuming it deletes itself or there's a command to delete it when the game ends that is in the JJCP....
i didn't read indepth into the endglobals part so....yea....
Summary:
Still wondering about that missionkey, waiting for verification of the activation process, and waiting for an answer to what a widget is....
I think i understand a bit more about cache and where it is stored thanks to haxorico
from what you said...i gather that the cache is stored/made/saved in the war3.mpq file?
Also, since the keybindings dont transfer over from one cheated map to another, im assuming it deletes itself or there's a command to delete it when the game ends that is in the JJCP....
i didn't read indepth into the endglobals part so....yea....
Summary:
Still wondering about that missionkey, waiting for verification of the activation process, and waiting for an answer to what a widget is....
I think i understand a bit more about cache and where it is stored thanks to haxorico