How to use the or operator when checking a value

Get help using Construct 2

Post » Mon Sep 23, 2013 12:35 am

Hi I'm having problems trying to use the or operator when checking a value in an array. What I want to do is filter out a list so that only potions are shown rather then the entire inventory.



It doesn't seem to be working as intended, it just populates the list with nothing in itzoddTHEimmortal2013-09-23 00:40:52
B
5
Posts: 13
Reputation: 676

Post » Mon Sep 23, 2013 4:33 am

You are ORing the two strings together, not checking if CurValue is equal to one or the other. Either break it into individual conditions, making an OR block, or use the System:Compare two values, with:

PlayersInventory.CurValue = "Health Potion" | PlayersInventory.CurValue = "Mana Potion"
Equal to
1
ImageImageImage
B
71
S
21
G
220
Posts: 3,646
Reputation: 123,721

Post » Fri Sep 27, 2013 6:40 am

I thought I had thanked you, my apologies

Thanks!
B
5
Posts: 13
Reputation: 676


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest