HALFRATS PS4 Posted June 28, 2016 Anyone got any information on how to program it so once you obtain a certain amount of points you get an extra life? I have my players lives limit figured out I'm just trying to figure out how to add resources to my "lives" every 10,000 points or so. Thanks in advance. 0 Share this post Link to post
redrage Posted June 28, 2016 I think I don't understand the problem. Is this not a simple matter of monitoring the variable that is holding the score, on variable changed fire a test and comparison and when its over the special bonus amount run a chain that adds one life and runs only once? 0 Share this post Link to post
HALFRATS PS4 Posted June 28, 2016 Yes, but having trouble putting the actual code together. I don't know how to add a resource via every X amount of points. 0 Share this post Link to post
Jesric1029 Posted June 28, 2016 Interesting problem. Unfortunately I can't think of an easy way to solve this. You really have a couple options. The first is to not use the score but instead do kills, this would be easier. Create a resource called "kills" and also set it on the his. Now create a demon proxy and select "on demon death" add 1 to the resource. Also create a counter with whatever amount of kills you want to earn the player an extra life. Now select the counter and put "on count reached" and give one to your player lives resource. Also make sure the counter resets on reached. That's the easy and probably the most efficient way. If you really want to use the actual score there are a few ways to do it. Now I'm not 100% sure if this will work or if there is a better way but it's the first thing to come to mind. Create a player proxy. Also create a timer with something reasonable like 5 seconds (don't make it appear on hud). Also create a Boolean called "Award Life" set to false by default. Now, set the timer to start on player spawn. When the timer is finished have it test the Boolean. If true then award player a life and set Boolean false, for true or false set the timer again (may have to use loop here not sure). Now use the player proxy to set "on score reached" and set Boolean true. You have have to set several of these on scored reached proxies depending on how much points a player can get. That is my idea. 0 Share this post Link to post
HALFRATS PS4 Posted June 29, 2016 Thanks man actually just using the player proxy to add a life works by itself. I just hooked it up to my lives variable. I set it at 300 points to test it and every 300 points I obtained I got an extra life. Thanks 0 Share this post Link to post