RICOCHET INFINITY

For all things Ricochet...
It is currently Mon Oct 23, 2017 7:50 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Hit Counter
PostPosted: Mon Apr 04, 2016 12:30 pm 
Offline
User avatar

Joined: Sat Dec 29, 2012 10:30 am
Posts: 188
Location: Ricochet Station, Infinity
Hey, all.

I thought I might have a try at bosses in Ricochet Infinity.
Here's one I've started work on:
Image
Here's the problem, though:
I thought about programming a hit counter above the boss, to say how many hits it has left to go, as you can see in the screenshot.
I'm not entirely sure how to do this, though. I've tried foreign variables, and broadcasting messages to decrease it.
Is there an easier way that I'm just not seeing? Any help will be much appreciated. :)

_________________
Image


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Tue Apr 05, 2016 10:23 am 
Offline
User avatar

Joined: Wed Mar 05, 2008 12:16 pm
Posts: 1821
Location: Belgium
Variables is probably the easiest way to do this if the boss has lots of health.
I don't see why you're using foreign variables though? You can just use a local variable and broadcast a message that triggers the brick to lower its own variable by one.

_________________
Image
It's a levelset that's isn't on the catalogus. It's worth it --> viewtopic.php?f=28&t=22838


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Tue Apr 05, 2016 11:18 am 
Offline
User avatar

Joined: Sat Dec 29, 2012 10:30 am
Posts: 188
Location: Ricochet Station, Infinity
gimanski wrote:
Variables is probably the easiest way to do this if the boss has lots of health.
I don't see why you're using foreign variables though? You can just use a local variable and broadcast a message that triggers the brick to lower its own variable by one.


Thanks for that tip gimanski :), but I don't know how to change the value of a local variable.

So, when I hit a brick, it sends a message to the marker that has set and is displaying the local variable.
When the marker gets the message, how do I get it to decrease the value by 1?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Tue Apr 05, 2016 1:27 pm 
Offline
User avatar

Joined: Wed Mar 05, 2008 12:16 pm
Posts: 1821
Location: Belgium
Teleporter B wrote:
gimanski wrote:
Variables is probably the easiest way to do this if the boss has lots of health.
I don't see why you're using foreign variables though? You can just use a local variable and broadcast a message that triggers the brick to lower its own variable by one.


Thanks for that tip gimanski :), but I don't know how to change the value of a local variable.

So, when I hit a brick, it sends a message to the marker that has set and is displaying the local variable.
When the marker gets the message, how do I get it to decrease the value by 1?


It's actually very easy:

Make a sequence that initiates the variable at base health.
Say the variable is called "health" and the base value is "20".
Next step in the sequence is another sequence that waits for a message (let's say hit) and whenever it gets that message the next step is to do Set local variable Math subtract: Health - 1.
Keep that inner sequence looping.
Congratulations, you have a simple health mechanic!

For reference, this is what it should look like:

Image

_________________
Image
It's a levelset that's isn't on the catalogus. It's worth it --> viewtopic.php?f=28&t=22838


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Wed Apr 06, 2016 4:51 pm 
Offline
User avatar

Joined: Sat Dec 29, 2012 10:30 am
Posts: 188
Location: Ricochet Station, Infinity
Brilliant :) I think it helps more with a screenshot.
Thanks gimanski. :mrgreen:

_________________
Image


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Sat Apr 09, 2016 4:38 am 
Offline
User avatar

Joined: Tue Jul 23, 2013 8:05 pm
Posts: 4348
Location: Aguascalientes, Mexico
Wait for Multiple Hits plug-in.
-.-

_________________
100000 rings reached as of August 16th, 2015.
Five years playing Infinity - April 2012
Four years on this forum - July 2013

I don't make level sets anymore. I moved my interests to video editing.


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Sun Apr 10, 2016 12:10 pm 
Offline
User avatar

Joined: Wed Mar 05, 2008 12:16 pm
Posts: 1821
Location: Belgium
Ivan187 wrote:
Wait for Multiple Hits plug-in.
-.-


that wouldn't work for a healthbar, unless you literally put it as a number on the center piece.

_________________
Image
It's a levelset that's isn't on the catalogus. It's worth it --> viewtopic.php?f=28&t=22838


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Mon Apr 11, 2016 6:53 am 
Offline
User avatar

Joined: Sat Dec 29, 2012 10:30 am
Posts: 188
Location: Ricochet Station, Infinity
That's the main problem.
There are certain parts of the boss that each take a certain amount of hits.
Another problem is that sometimes, when a part gets hit by the ball and a laser, it only counts as one hit.
This sometimes lead to 1 or 2 HP being left over, and messes things up, :?:

_________________
Image


Top
 Profile  
 
 Post subject: Re: Hit Counter
PostPosted: Mon May 16, 2016 7:22 pm 
Offline
User avatar

Joined: Sat May 17, 2014 9:48 am
Posts: 478
Location: St. Johns, Florida, USA
I had no idea that variables were in Ricochet Infinity! :D
This will probably help me in levels, and I know how to use variables since I take Computer Science in school and have worked on the Python and Visual Basic programming languages.
I knew that Ricochet Infinity's simultaneous plugins were like coding, but I didn't know it was that similar.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group