Search found 254 matches

Re: How do I Load image from directory & output it

Loading the image should be straightforward - using the Sprite>Load image from URL action.

Retrieving the image for output might be harder - you might want to look at the Paster plugin: plugin-paster_t88750
by mrtumbles
Thu May 24, 2018 12:01 pm
 
Forum: How do I....?
Topic: How do I Load image from directory & output it
Replies: 1
Views: 32

Re: How do I use Delta Time with this Tranistion/Countdown

It's that ( 1+dt ) bit that's the problem. Delta-time needs to be directly related to the number you're using. Try something like ( 60 * dt ) instead. So long as it's multiplying by dt, you'll want to fidget with that 60.
by mrtumbles
Thu May 24, 2018 11:54 am
 
Forum: How do I....?
Topic: How do I use Delta Time with this Tranistion/Countdown
Replies: 2
Views: 22

Re: How do I check value in array some positions ago

What makes you feel this way?
by mrtumbles
Sat Jan 06, 2018 3:45 pm
 
Forum: How do I....?
Topic: How do I check value in array some positions ago
Replies: 3
Views: 167

Re: How do I make an object stay in the camera zone?

I think you're probably gonna have to post a capx
by mrtumbles
Fri Jan 05, 2018 7:16 pm
 
Forum: How do I....?
Topic: How do I make an object stay in the camera zone?
Replies: 5
Views: 161

Re: How do I make an object stay in the camera zone?

Set object position to:

clamp( Self.X, ViewportLeft( Self.LayerName ), ViewportRight( Self.LayerName ) )
clamp( Self.Y, ViewportTop( Self.LayerName ), ViewportBottom( Self.LayerName ) )
by mrtumbles
Fri Jan 05, 2018 6:06 pm
 
Forum: How do I....?
Topic: How do I make an object stay in the camera zone?
Replies: 5
Views: 161

Re: Let system predict which random sprite it's going to spa

@dop2000 is correct when he says it's probably better to handle the bullet with one object rather than three, presuming the bullets all behave the same otherwise. I like the idea by the way, only allowing the player to shoot matching enemies, that's cool. If you need to do this still (ie, bullets of...
by mrtumbles
Mon Dec 25, 2017 11:09 am
 
Forum: How do I....?
Topic: Let system predict which random sprite it's going to spawn?
Replies: 2
Views: 115

Re: How do I set position after switching layout?

I would definitely try and make it so that the player was represented by the same sprite object everywhere they're present. You're lining yourself up for a headache.
by mrtumbles
Mon Dec 25, 2017 11:03 am
 
Forum: How do I....?
Topic: How do I set position after switching layout?
Replies: 3
Views: 158

How can I make more effective use of Browser.ExecJS?

Just recently I've started using tiny little bits of javascript through the Browser.ExecJS expression. It's neat, and has solved a few problems that vanilla C2 just can't. I'm learning more about javascript now (most of what I've gotten has been cribbed from other sites/this forum), but would anyone...
by mrtumbles
Sun Dec 24, 2017 10:04 am
 
Forum: How do I....?
Topic: How can I make more effective use of Browser.ExecJS?
Replies: 0
Views: 73

Re: How do I set position after switching layout?

Can't view your capx as I'm on mobile - but I would add two global variables to store your position. Call them something like 'ReturnToX' and 'ReturnToY'. Before switching layouts, set the global variables to the player's X and Y. After switching back, set the player's X and Y to the contents of the...
by mrtumbles
Sun Dec 24, 2017 9:44 am
 
Forum: How do I....?
Topic: How do I set position after switching layout?
Replies: 3
Views: 158

Re: How do I get a textarea's cursor (caret) position?

Self-solved! First bit of javascript I sorted out for myself... Browser.ExecJS ( "{ var ctl = document.getElementById('code'); var startPos = ctl.selectionStart; var endPos = ctl.selectionEnd; startPos + "","" + endPos; }" ) Where "code" is the ID of the texta...
by mrtumbles
Fri Dec 01, 2017 11:12 am
 
Forum: How do I....?
Topic: [solved!] How do I get a textarea's cursor (caret) position?
Replies: 1
Views: 84
Next

Return to advanced search