Poll

Help plz?

What you're trying to do is simple!
2 (33.3%)
Err...idk what you're trying to do...(only n00bs who don't read vote this)
1 (16.7%)
What you're trying to do has never been done before.
0 (0%)
It is impossible to do this.
1 (16.7%)
I will try to help you.
2 (33.3%)

Total Members Voted: 6

Author Topic: VCE Help  (Read 2515 times)

I have read and re-read the VCE Client many, many times. I would think that it is possible, but I am going to ask about it here, and hopefully get some good answers from the pros.

Okay, so I'm working on a massive Medieval RPG, and I was hoping to use VCE for some really, super advanced stuff. First off, I want to make it so that when a player joins the minigame, it initializes their variables. I have been using the onMinigameJoin input event, and I've tried setting up the player's variables (such as level, exp, etc.) using the Player and Client targets. None of them work. Here's what I have done with events (on the spawn point brick):

onMinigameJoin -> Player -> VCE_modVariable -> gold -> Set -> 0  (player's money)
onMinigameJoin -> Player -> VCE_modVariable -> exp -> Set -> 0  (player's experience)
onMinigameJoin -> Player -> VCE_modVariable -> rank -> Set -> 1  (player's rank. 5 ranks to a level)
onMinigameJoin -> Player -> VCE_modVariable -> level -> Set -> 1  (player's level)
onMinigameJoin -> Player -> VCE_modVariable -> class -> Set -> None  (player's class. Rouge, Warrior, Mage)
onMinigameJoin -> Player -> VCE_modVariable -> story -> Set -> 0  (how far the players are in the game's plot.)

I've tried that, and I've tried it with the Client as a target. Nothing works. I know becuase I have VCE prints displaying them. All help is appreciated.

To summarize, I have been having troubles with variables. On the spawn brick, I have the onMinigameJoin input, and I've tried both Player and Client as targets when I create the player variables. Help plz?

Another question I have is whether or not I can manipulate battle. By creating a maxDmg variable for the player that increases by 1 every rank, I hope to make it so that whenever a player attacks an NPC or is attacked, a randomnumber is triggered between 0 and the player's maxDmg variable that determines how much damage the enemy takes, instead of the weapon's ordinary damage. Is this possible?

OnMinigameJoin doesn't work for me either, I think it's broken.

Also; What do you type to display your variables? Just want to check if you're doing it right.

Do you have zones?

onActivate > Self > VCE_ifValue <var:cl:isHost> [=] 1 [1 1]
onVariableTrue > Self > setZone [Up] 10 {0 0 0}
onPlayerLeaveZone > Self > VCE_modVariable [Client/Player] Your Variable Here [Set or whatever] #
on a 16x baseplate with the spawns on it.

Add as many onPlayerLeaveZone's as you need.

Another question I have is whether or not I can manipulate battle. By creating a maxDmg variable for the player that increases by 1 every rank, I hope to make it so that whenever a player attacks an NPC or is attacked, a randomnumber is triggered between 0 and the player's maxDmg variable that determines how much damage the enemy takes, instead of the weapon's ordinary damage. Is this possible?
It is very possible. By giving the bot's brick a variable, it will have its health. With the new version of Bot Mod, you can make it so when the bot is attacked, it would heal, but lose its health variable. By killing the bot with the required variable, you will gain a level up or what-not and will have to go into advanced. Iv done this on an RPG, and it isn't too hard to figure out.

Also; What do you type to display your variables? Just want to check if you're doing it right.

Good question. Okay, it's kind of long, but it's all on the bottom print:

<color:00ff00>Class: <var:player:class>  <color:0000ff>Rank: <var:player:rank>  Level: <var:player:level>  <color:ffffff>Exp: <var:player:exp>/<var:player:expLeft>  <color:ff0000>Max Damage: <var:player:maxDmg>  <color:ffff00>Gold: <var:player:Gold>

I also changed it when necessary when I was dealing with the client as a target instead of player.

Do you have zones?

onActivate > Self > VCE_ifValue <var:cl:isHost> [=] 1 [1 1]
onVariableTrue > Self > setZone [Up] 10 {0 0 0}
onPlayerLeaveZone > Self > VCE_modVariable [Client/Player] Your Variable Here [Set or whatever] #
on a 16x baseplate with the spawns on it.

Add as many onPlayerLeaveZone's as you need.

Um...yeah...but then anytime someone goes back into the 'spawn zone', it will reset their variables. I do not think zones would be good for that.

It is very possible. By giving the bot's brick a variable, it will have its health. With the new version of Bot Mod, you can make it so when the bot is attacked, it would heal, but lose its health variable. By killing the bot with the required variable, you will gain a level up or what-not and will have to go into advanced. Iv done this on an RPG, and it isn't too hard to figure out.

Ohhhh...I get it! Everytime the bot is attacked, it's health will set back to 100, but a special variable on its brick holds its 'health'. When you attack, a randomnumber is triggered between 0 and the player's maximum damage <var:player:maxDmg>. This number is then subtracted from the bot's 'health', and when it reaches or goes below 0, the bot will be killed, and the player gets awarded experience. I'll have to try it out and see what happens!

How did you do it Kobewarrior? I tried it a few times, trying different things, but it doesn't work. I've tried making it so that when the health variable reaches or goes below 0, it calls a function that kills the bot. How did you do it? My way doesn't work.

Um...yeah...but then anytime someone goes back into the 'spawn zone', it will reset their variables. I do not think zones would be good for that.

Actually, nvm. I just realized it is onLeaveZone input, not onEnterZone. Well, if that works, then that problem is solved.

Do you have zones?

onActivate > Self > VCE_ifValue <var:cl:isHost> [=] 1 [1 1]
onVariableTrue > Self > setZone [Up] 10 {0 0 0}
onPlayerLeaveZone > Self > VCE_ifValue <var:pl:newPlayer> [!=] 1 [3 4]
onVariableTrue > VCE_modVariable [Client/Player] Your Variable Here [Set or whatever] #
onVariableTrue > VCE_modVariable [Player] newPlayer [Set] 1
on a 16x baseplate with the spawns on it.

Add as many onPlayerLeaveZone's as you need.

That should fix them returning to and then leaving the spawn.

NOEDIT, Addendum: You have to increase "4" by one every time you add a new line of the following:

onVariableTrue > VCE_modVariable [Client/Player] Your Variable Here [Set or whatever] #


Thanks. That will work well. Now I just need to figure out what I'm going to do about the combat. I want to use VCE for the new combat so that players cannot abuse the power of some of the weapons and fight tough monsters to level up faster. Instead, they will have to fight monsters around their level if they want to beat them.

Thanks. That will work well. Now I just need to figure out what I'm going to do about the combat. I want to use VCE for the new combat so that players cannot abuse the power of some of the weapons and fight tough monsters to level up faster. Instead, they will have to fight monsters around their level if they want to beat them.
onprojectilehit>player>if_variable rank/level < rank/level(number)
onvariabletrue>player>kill

hope its not too complicated

New question. Can I modify the player's max health? If so, how do I do it? Here's the event I used:

onPlayerleaveZone -> Player -> VCE_modVariable -> <var:player:health> -> Set -> 10
onPlayerleaveZone -> Player -> VCE_modVariable -> <var:player:maxHealth> -> Set -> 10

It doesn't work. Using the event

onPlayerleaveZone -> Player -> SetHealth -> 10

works for the health in general, but it doesn't change the maximum health. How do I change the maximum health?