Shop / Share & Fork missing?
fuzz

Hi everybody,

I started exploring Wade just recently. In tutorials and forum posts everybody is reffering to "Share and Fork" or the "Shop" for additional scripts, etc.

However, I can't access any of those links because I'm always redirected to either home page or the "open source project" page.

Is this me or it's a known issue?

Thnx.

 

 

 

All 5 Comments
Gio

Hi fuzz and welcome to the forum

Yes I'm afraid those links may be a bit outdated. They are things that used to exist in older versions of this site.

Share and Fork was a place where people would upload their scripts and create forks of other people's projects. However everyone was just using it to download the same 3 or 4 projects, so we've removed it and replaced it with the open source projects page. 

The shop is also something that we used to have for people to buy art assets or plug-in's, but was too much effort to maintain and it's gone now. Some free art assets are still available in the downloads page.

If you are looking for something in particular though, we most likely have backups of it. If you let us know what you're looking for we may be able to add it to the open source projects or the downloads page, or just email it to you.

fuzz

Hi Gio,

thnx for a quick reply.

I was looking for something related to time counters, scoring, progress bars...

I downloaded "Open Match 3" project and noticed "counter" and "bar" scripts. Guess I just need to figure out how to use them...

Gio

I think foxcode wrote both those behaviors, I've sent him a mesasge to ask if he can explain briefly how it works.

I think for counter, you just add the behavior to an object, then use it like this:

myObject.getBehavior('Counter').setValue(12345);

For the timer bar, I think the important thing is that you call its init function at some point when the scene is loaded, then it should do everything by itself.  If you open the script there's a description of what to pass to init. Unfortunately it's not very editor friendly, you have to call init from code and cannot set parameters in the behavior editor directly. We'll look into making it easier to use.

foxcode

Hi fuzz.

I just had a go at using the bar behavior in the editor. It was created before the editor even existed and though I kind of got it working, it is not very nice.

 

Now that wade supports shaders, I suggest you do the following

  • Create a new sceneobject for your bar, make it the size and shape that you want.
  • Add the following custom pixel shader to the procedural_square sprite of the newly created scene object
gl_FragColor = uvAlphaTime.x < fraction? mix(color0, color1, uvAlphaTime.x) : background;
  • You then need to add 4 shader uniforms. All of these shader parameters take values between 0 and 1
  1. Name: color0 Type: vec4 - This is the first colour to use for your gradiant, so if you wanted red, set 1,0,0,1 for rgba
  2. Name: color1 Type: vec4 - This is the second colour to use for your gradiant
  3. Name: background Type: vec4 - This is the background colour, this will take the whole bar when faction is set to 0
  4. Name: fraction Type: float - This is the percentage of the bar you wanted filled as a decimal. 0 = 0%, 1 = 100%

 To set the current faction of the bar, all you have to do is call getSprite on the scene object and set the fraction property, so as an example if I want 25% of the bar filled
 

var bar = wade.getSceneObject("myBar"); // Assuming you name the scene object myBar
var barSprite = bar.getSprite();        // Get the sprite, no index needed as only 1
barSprite.fraction = 0.25;              // The value we want

 

I hope this helps :)

fuzz

Thank you both for a swift assistance provided!

I will test the proposed method during the day and let you know how it goes.

Post a reply
Add Attachment
Submit Reply
Login to Reply