help

Get help using Construct 2

Post » Tue May 16, 2017 2:40 pm

i am making a towerdefence game and i am useing the drag and drop behavior but im haveing a problem with makeing it so they cant drag it when they have less then the needed amout of money to get a tower i have it to set drag and drop disabled when money is less than 125 but it makes it so that way when im buying one and i dont have 250 when my tower cost 125 it will disable drag and drop after it takes my money i dont know how to fix this if you could help me out that would be great thx!!
B
3
Posts: 8
Reputation: 193

Post » Tue May 16, 2017 3:07 pm

If I understand you correctly, please do this:

Create this Function:
Image

Whenever your money or the price of a tower changes, execute this function.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Tue May 16, 2017 3:11 pm

ok
B
3
Posts: 8
Reputation: 193

Post » Tue May 23, 2017 2:36 pm

that didn't help
B
3
Posts: 8
Reputation: 193

Post » Tue May 23, 2017 5:03 pm

Well, it worked for me when I created an example...

Created a bit more detailed example, with almost exactly the same loop that I showed in the image:
Download .capx

The reason why it didn't work for you is probably because you put the function call in the wrong location.
You need to execute the function each time when the amount of money changes.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests