Lightmap, what am I doing wrong?

For questions about using Classic.

Post » Sat Apr 17, 2010 8:24 pm

I've spent too long tying to figure this out. Why wont the light follow the mouse, I've copied the example exactly (right down to capitolization and spacing). How can I make this follow the mouse? Or attach it to an image point on an object?

[url:hfxe8l10]http://www.filedropper.com/gunflashtest[/url:hfxe8l10]
B
2
G
3
Posts: 23
Reputation: 896

Post » Sat Apr 17, 2010 9:50 pm

Hello :)
I'm not quite sure what bumpmapping is, so I have no idea what your trying to do with that. If you want to set it up using the always event, then choose "Light," "set position", change X to "MouseX" and Y to "MouseY." Otherwise, just add the behavior, "Mouse," to your "Light." Also, you may have to set the hot spot, so double click on "Light" and set the "hot spot(and orange dot in the tool bar on the left)" to the center of "Light." It should work after that. :)
B
2
G
2
Posts: 48
Reputation: 746

Post » Sat Apr 17, 2010 10:31 pm

[quote="Komdour":19rvc6ud]I've spent too long tying to figure this out. Why wont the light follow the mouse, I've copied the example exactly (right down to capitolization and spacing). How can I make this follow the mouse? Or attach it to an image point on an object?[/quote:19rvc6ud]

You basically have the right events. But your dividing by Sprite.Width and Height, yet your sprite is larger than the window. Divide by DisplayWidth and DisplayHeight instead or resize your sprite to fit the window.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sun Apr 18, 2010 7:45 pm

Thanks, I figured it had something to do with the display. Resizing the sprite isn't an option because it will be the ground in my game. And I would like the game to be a bit bigger than a 1 screen wonder.
By dividing by display height/width do you mean like 800 by 600, or is there an event somewhere for that?
B
2
G
3
Posts: 23
Reputation: 896


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests