Use cr_Property value in .....

For developers using the Construct 2 Javascript SDK

Post » Thu Oct 30, 2014 6:32 pm

Hi , I need an simple urgent help,
I want to ask anyone who has experience in C2 Plugin/behavior creation . I'm making a new behavior called "Health" (It's simple for you I know , but for me it is so much) , which have two properties & some twists....
one is "Hit Rate"
Image
Image
its value is equal to one: Image
So i want in the event to when the action lose life happen, it loses the default amount from property "Hit Rate".
Image
SO I want to replace this specific part of code to choose the initial value from the the array's 2nd object "Hit Rate" and show it in the event sheet.
What should I replace between the + Value + ?
Image
Please it's important for me, and thanks in advance!
Last edited by Naji on Mon Nov 03, 2014 7:19 pm, edited 2 times in total.
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,431

Post » Fri Oct 31, 2014 11:23 am

Hey, @Naji images are broken, can you fix 'em? it's kind of hard to tell what's going on!
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Sat Nov 01, 2014 7:52 pm

JohnnySheffield wrote:Hey, @Naji images are broken, can you fix 'em? it's kind of hard to tell what's going on!

are they visible now?
The idea is to show the value of a property in the array Property_list
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,431

Post » Sun Nov 02, 2014 7:09 pm

Anybody? :cry:
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,431

Post » Sun Nov 02, 2014 7:19 pm

The images aren't viewable, it's hard to help without an idea of what you are trying to accomplish. Maybe you could look into the source of other plugins for help.
B
11
S
2
G
1
Posts: 202
Reputation: 1,580

Post » Mon Nov 03, 2014 2:21 pm

All the images still return 403 (access denied).
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Mon Nov 03, 2014 2:25 pm

Just upload them to imgur, Naji. The dropbox you set up seems to be private or setup incorrectly.
B
33
S
9
G
3
Posts: 493
Reputation: 4,042

Post » Mon Nov 03, 2014 7:21 pm

@alvarop thanks for telling me about imgur it worked :D
@Ashley hi! I'm very happy that you replied to my topic, I fixed it now. Maybe because the photos wan't in the public folder.
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,431

Post » Mon Nov 03, 2014 11:32 pm

It's not possible. You can only show the values of parameters in the display text. Perhaps you could add a parameter which defaults to the value you want.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests