Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:29:29+00:00 2026-06-14T18:29:29+00:00

How do I make my player fade in and out for a few seconds

  • 0

How do I make my player fade in and out for a few seconds when collision occurs? I have my player setup that when he collides he loses a life but when he collides he basically gets stuck on the object. I want him to collide, lose a life and flash in and out for a second past the physics object with the player not having any physics properties for that fade time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:29:31+00:00Added an answer on June 14, 2026 at 6:29 pm

    Collide I suppose you are doing with physics.

    For losing a life, that is up to your code.

    Flashing in and out:

    Use “transition” and “setFillColor” or “alpha”, I use this code personally in one of my projects:

    --on collision yaddayadda
    myPlayerObject.alpha = 0.3;
    transition.to(myPlayerObject, {alpha=1, time=300})
    --more yaddayadda
    

    Since you can only REMOVE color (not add) using code, if you want it to flash white (like those old NES games), you will need a second object that is white, and do the reverse of what I did (set alpha to 1 and transition to 0 instead).

    Making physics object don’t have properties:

    There are a property named “isSensor”, just set it to true on your player, this will make it don’t collide with other stuff but maintain momentum, velocity and whatnot.

    It will still trigger a collision event (but it won’t “bump” into stuff) thus you will need to check if “isSensor” is true, and return from that point instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two displays. I want to make a media player and I want
I'm trying to make this 2-player web game application using Spring MVC. I have
I'm trying to make an mp3 player that passes javascript events to a flash
I want to make a 2 player pong game that uses websockets and node.js
On my site, I have a static-width embedded chromeless YouTube player (iframe) that plays
I have been trying to make a function that slowly fades to black once
I'm trying to make a command that allows you to make any player invulnerable
What precisely do I need to make a multi-player game on smartphones like Blackberry
I want to make some GUI mockup program for video player, so my idea
Ok I am trying to make a dynamic pathing system so the player can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.