Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

Transfer of analog signal through impacts

Archive: 15 posts


I'm currently working on a hack & slash RPG based on collecting loot that scales in quality. As you progress through you find better (more damage) weapons and spells to equip. So these weapons and spells scale within 7 different qualities.
Originally I would have used 7 unique named impact sensors wired into 7 different chips with 7 different batteries giving 7 different signals into an OR gate that goes into the direction combiner and into the speed scale timer health bar.. Then would still need to have 7 different unique named tags for each of the 7 "amounts" of damage..

I always thought it would be nice if you could transfer the analog signal that is on a tag, through an impact sensor's output. So if a red impact sensor is impacted with an object with 50% signal the impact sensor would output 50% signal. Well they don't. Impact sensors only detect the digital signal of if they are impacted or not. The following picture shows a scaling damage system with 3 different amounts of damage for a red tag. "weak", "medium" & "heavy" amounts. Then the batteries would determine those amounts. *Note there is no adder in this example.. woops..

http://i9.lbp.me/img/ft/659ec287eb85c5eba0320bdb160e0828b2e5f70e.jpg

The bottom example would be the setup if impact sensors could receive analog signal. This would transfer whatever the impacted tags signal would be. Although.. I'm not quite sure how you would make an adder for this type of setup since the red tag is universal..

Anyways. It is actually unnecessary to have an impact sensor transfer analog signal if you use this next (very redundant) method. Apologies if this is a known technique but I found it very simple, very useful and much more versatile than using 3 or 7 unique named tags/impact sensor pairs for damage scaling. Honestly I don't know why it took me this long to realize this..

http://ia.lbp.me/img/ft/91a76fd4904b92ce7a862ce10ad1e01eaea07d07.jpg

The red impact sensor (include touching/rigid connections) activates if it is impacted by a red tag of any value 1-100% since it is digital. Once impacted it activates the red tag sensor (set to signal strength & same layer) and since it is the same exact tag, It will most definitely activate the tag sensor to transfer what ever the projectile or hitbox's signal is.
This allows you to scale damages from the projectiles & hitoxes themselves while using only 1 tag name and never needing to adjust the health bar or add any more than 1 tag sensor & 1 impact sensor.
2012-07-02 18:43:00

Author:
Dortr
Posts: 548


My mind hurts2012-07-06 02:00:00

Author:
Unknown User


Nice find! Might come in useful some time 2012-07-06 09:45:00

Author:
Deurklink1
Posts: 346


Yes it is Indeed a good idea,

I raised this idea long time ago, have a look into this thread (https://lbpcentral.lbp-hub.com/index.php?t=65040-Health-system-with-feedback-loops);

I have already a level that use this, and it's really nice indeed.
2012-07-12 18:17:00

Author:
xquake
Posts: 73


How would one scale the analogue signal of the tag/projectile damage though? Batteries don't have inputs, so wouldn't you need multiple projectiles with the same tag but with different batteries? I apologize if this question has been answered already.2012-07-18 02:23:00

Author:
synchronizer
Posts: 287


What if, the enemy or object with the health logic gets hit by two tags (two attacks) with different percentages? would they be added? or would the highest one work instead?2012-07-18 09:32:00

Author:
ConanUltimate
Posts: 104


How would one scale the analogue signal of the tag/projectile damage though? Batteries don't have inputs, so wouldn't you need multiple projectiles with the same tag but with different batteries? I apologize if this question has been answered already.

In my experience working with this logic desing it is nice because you can creare different projectiles with different amount of damage so for example I create a bullet with 5% of damage, a missile with 30% damage etc.

After you create the chip with the logic just assign your desired amount of damage... To battery connected to the damage tag
2012-07-18 17:50:00

Author:
xquake
Posts: 73


What if, the enemy or object with the health logic gets hit by two tags (two attacks) with different percentages? would they be added? or would the highest one work instead?

I'm talking about my own experience, on my level My first approach was ignoring the one with less %damage. But then I "rewire" my version and used your second approach. But its up to you how to deal with that.

May be the author of this tutorial can give to you an answer on that too :-)
2012-07-18 17:57:00

Author:
xquake
Posts: 73


Would adding work with this case of logic? or will only the highest one pass through?
(whoops! just read post again)
2012-07-18 20:41:00

Author:
ConanUltimate
Posts: 104


I'm talking about my own experience, on my level My first approach was ignoring the one with less %damage. But then I "rewire" my version and used your second approach. But its up to you how to deal with that.

May be the author of this tutorial can give to you an answer on that too :-)

Using the OP's logic it wouldn't intrepret both impacts at the same time, since it's really more of quasi-perfect hit detection. I don't know exactly how it reacts though.
2012-07-20 13:20:00

Author:
BIGGamerer
Posts: 182


I did something similar in my Health Meter Toolkit, but I've been a bit more obsessive-compulsive with it. Let me find the forum post...


Sensors set to signal strength output the signal of the Nth strongest tag detected, where N is the set required amount of tags.
If I have tags 10, 20, 30 and 40%. The sensor with required amount set to 1 will output 40, the one set to 2 will output 30, and so on, 20 and 10. By making a chain of sensors and setting them to many amounts, then adding their strength, you can add the signals of every single tag detected. Using a system where the damage pulse is set in the projectile and transmitted through tags allows to count multiple hits at the same time !

I used this propriety to make sure it would work with up to 10 tags at the same time just in case. But I think I also have a 2-way confirmation: projectile hits the guys and transmits a damage value, player/foe receives signal and sends back a signal to destroy the projectile. I think it was too much for nothing though, haven't looked at it afterward. I guess I could make a Health Meter Toolkit v6 one day, as planned. But I got taken away from LBP by school, Minecraft and GameMaker. PC object-based programming is more powerful about this than LBP because each instance of an object has a name.

I guess I sould read https://lbpcentral.lbp-hub.com/index.php?t=59607-How-to-buffer-events-(and-use-it-with-a-counter)&highlight=buffer again, but my head hurts
2012-07-21 04:35:00

Author:
Unknown User


Would adding work with this case of logic? or will only the highest one pass through?
(whoops! just read post again)
I'm not actually sure if you can have added signals with this setup unfortunately.. There are 2 possible errors with this setup.. Being hit by 2 of the same tag at the EXACT same time (.1 second window though..) it will only register the highest. The second error is that since the impact sensor turns on the tag sensor to grab that % signal, if it is hit by one tag and another is within the radius, it can read the other tag that is not even touching. Both issues are quite rare though. Matter of fact I have not even gotten them to happen when trying lol.
2012-07-23 18:45:00

Author:
Dortr
Posts: 548


Ah I remember you saying about this, I used this same principal in my Trial.of the faceless with a slightly different setup, using an impact sensor and a global tag sensor plugged to an and gate for my damage system. Then I simply put the batteries on the weapons as you said. ( only I used two seperate batteries in order to assign.a different damage value to front and back slashes)2012-08-12 23:36:00

Author:
Tynz21
Posts: 544


I've also had this very idea
I've trying to make a level, except with upgrade guns, and I stumbled upon the monotonous amount tag names and tried to use the logic used here, but my only problem was that the bullets would travel too fast and would not register at all with the tag sensor. I really wish they would implement analog detection in impact sensors. This tutorial is definitely helpful and a way to get past that obstacle.
2013-09-01 03:45:00

Author:
Unknown User


I did essentially the Same thing as this on a level only I just plugged the tag and the impact sensor into an and gate. The and gate outputs the lesser signal Which would be that of the tag sensor. Ta da.2013-09-02 06:31:00

Author:
Tynz21
Posts: 544


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.