Spriter/C2 update 11/2 bug fix for performance mode

Discussion and feedback on Construct 2

Post » Wed Jul 01, 2015 12:54 am

@lucid Yes, that's it. I want to be able to set starting opacity in the properties pane~
I mean I set the spriter object fade in with lite tween plugin,and I need to set opactiy "0" In the beginning,
B
33
S
10
G
1
Posts: 78
Reputation: 3,119

Post » Thu Jul 16, 2015 1:21 pm

Image
@lucid I'm starting to work on randomized clothes for the NPC's in my game. I would like to be able to randomly pick colors or at the very least say pick a random number between 1 and 10, if 8, tint the sprite this color.

So far, I can randomly tint each sprite in my Spriter Object by itself. Where I'm having trouble is when I want each sprite to reference a particular object in the same container for the information. In a previous post you showed me how to have a box in the Spriter object and assign the platformer behavior to it. Then I just move the Spriter Object to that box and pin it.

What I want to have happen is the box has all of the variables for the different colors and are randomly picked on creation. Then Each Sprite in my Spriter Object will look to the box for its variables and change their tints accordingly. I'm having trouble with them referencing the box.

Any help is appreciated. Thanks.

-Ben
http://www.NeedYourDisease.com
http://www.facebook.com/NeedYourDisease
http://www.twitter.com/NeedYourDisease
B
40
S
11
G
6
Posts: 228
Reputation: 6,951

Post » Thu Jul 16, 2015 3:31 pm

My Solution Below
The Rate Of Color Change Can Be Adjusted By Adding More Time On to the System Every 2.5 Condition.
Increasing The Value Will Slow Down Speed And Decreasing Will Speed Up The Rate Of Change
Last edited by JAYSTILLA on Thu Jul 16, 2015 4:06 pm, edited 1 time in total.
B
5
S
1
Posts: 5
Reputation: 434

Post » Thu Jul 16, 2015 3:33 pm

Author of Events: Jay Stilla
Title: Tint--[eFx]-
.Capx Example: <a href="https://www.dropbox.com/s/e789s9bxgqfegx8/VegasMode-TintFx.capx?dl=0
">DropBox.Com Capx File</a>
Level: Intermediate
Scirra LTD Construct 2 [r204.2 Beta]
Description:Vegas Mode [Several Instance of An Obj - Using Tint Color Effect - Random Parameter & rgb(0,0,0) Value Set From A Single Color Variable With A Value That randomly <varies> To Affect Each Instance Separately By .UID#


Layout:
10 Sprite/Object- Instance] Needs An Identifier - Add A Variable Called Color That <Varies> In Value =0

Event Sheet:
1.Condition: System On Start Of Layout
// Action: Sprite - Set Tint Effect to Enable
=================================
2. Condition: System Every Tick
// Action : Sprite - Set Var Color to round(Random(0,255))
// Action Sprite - Set Effect Tint Parameter Index=round(random(0,2)) Value= Self.Color
=============================================================
3.Condition: System Every 2.5 Secs -
// Action Sprite Set Effect Tint Parameter Index= 0 Value= Self.Color+50
Press S - or Add Sub Event
4.Condition: Sprite Pick Instance With UID. Value =round(random(0,10))
//Action Sprite Set Value of Var Color to Choose(25,50,75,100,125,150) + round(Random(100,0)
//Action Sprite Set Effect Tint Parameter Index =1 Value= Self.Color - 50
=====================================================================
5. Condition: Sprite Pick Nearest To - X= random(LayoutWidth), Y = random(LayoutHeight)
// Action Sprite Set Effect Tint Parameter Index= 2 Value= Self.Color-25

@sman118
B
5
S
1
Posts: 5
Reputation: 434

Post » Thu Jul 16, 2015 4:58 pm

Thanks @jaystilla but what I need is a way to tell 4 out of 10 sprites in a container to change their effect parameters to match a 5th sprite in the same group of 10. I have it working now with everything being set when it is spawned, but I wouldn't mind a way to say say look at sprite: box in the same container as you.

I appreciate you trying to help me out though.

Ben
B
40
S
11
G
6
Posts: 228
Reputation: 6,951

Post » Sun Jul 19, 2015 12:05 pm

winsonzhong wrote:@lucid Yes, that's it. I want to be able to set starting opacity in the properties pane~
I mean I set the spriter object fade in with lite tween plugin,and I need to set opactiy "0" In the beginning,

@winsonzhong:
7/19/2015
  • Added edittime property 'starting opacity'.


sman118 wrote:What I want to have happen is the box has all of the variables for the different colors and are randomly picked on creation. Then Each Sprite in my Spriter Object will look to the box for its variables and change their tints accordingly. I'm having trouble with them referencing the box.

@sman118, For that you could add the playerbox sprite to the container. Then when you refer to playerbox.myVariable it will automatically associate with the correct playerbox. Here's an example with opacity retrieved from the private variable 'startingOpacity' in 'PlayerSprite':
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Mon Jul 27, 2015 8:15 pm

Your Welcome @sman118
B
5
S
1
Posts: 5
Reputation: 434

Post » Sat Aug 08, 2015 1:53 am

@lucid Does Spriter support warping yet?
B
9
S
2
G
1
Posts: 97
Reputation: 1,931

Post » Sat Aug 08, 2015 1:54 am

@lucid Does Spriter support warping yet? If not, does anyone know a program where you can warp sprites. Thanks
B
9
S
2
G
1
Posts: 97
Reputation: 1,931

Post » Sat Aug 08, 2015 3:05 pm

ThunderLion wrote:@lucid Does Spriter support warping yet?

Spriter Pro let's you try out an early prototype version of our future warping features (this video has a brief overview of how to test it: https://youtu.be/V0ehOfGP5XY?t=383). We don't recommend starting a major project with warping just yet, as the final version of the feature will be expanded and enhanced, and projects using the current version of the feature might not be compatible with the final version. Also, because the current version will be replaced with a better version, we can't invest any time in support if you happen upon any bugs or issues with this prototype version of warping. Here's an example of what one user was able to create with the prototype feature: http://brashmonkey.com/forum/index.php? ... tes/page-2

It will eventually be fully supported in both Spriter and the C2 plugin, but in the meantime, you can export animations using the current deform feature to sequential pngs and import them as regular sprites in C2, if you just want to try it out.
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests