Angelman's Light Tutorial

Darn.  Thanks for looking at it though Angelman.

Does anyone know of a way I could accomplish walking with a lantern?
TLarch: Wait I'm a bit confused. What are you asking about? If you can have the light around your character all the time?
No no.  I'm trying to get a light source that may be turned off and on in any location, including the dark mines where he is now, preferably by an item.

I'm still poking around with no avail.
Now this is frustrating.  I put an Add 1 gold right next to the move picture command to see if it was looping the move picture.  My gold skyrockets, but the picture still does not work.
TLarch, try this method. I used it in my last game and it works without a problem.

You have to use 3 common events, which I named "Lantern", "Light ON", and "Hero Screen X/Y".

"Lantern", Trigger "None" (called from the inventory)
@>Conditional Branch: Switch [0001: Light ON] == ON
   @>Control Switches: [0001: Light ON] = OFF
   @>Erase Picture: 1
: Else
   @>Control Switches: [0001: Light ON] = ON
   @>Show Picture: 1, 'light', Center (Variable [0003][0004]), (100%,100%), 0, Add
: Branch End
Expand to see the code.


"Light ON", Trigger "Parallel", Condition switch [0001: Light ON]
@>Move Picture: 1, @1, Center (Variable[0003][0004]), (300%,300%), 150, Add
@>Wait: 1 frame(s)
Expand to see the code.



"Hero Screen X/Y", Trigger "Parallel", Condition switch [0002: Lantern] (turn on this switch when you receive the lantern)
@>Control Variables: [0003: LanternX] = Player's Screen X
@>Control Variables: [0004: LanternY] = Player's Screen Y
Expand to see the code.


Of course, the switch and variable IDs may be different from yours, but otherwise it should be the same. I put the "control variables" in a separate common event that's always on, which might help fix your problem.
Thank you Regi, but I have discovered my problem.  I tried the light in a new file and it works perfectly.

The problem is in the my battle script.  Something about Blizz-ABS script interferes with the picture commands. Very uncool, but I guess I'd rather have the ABS battle system than the lantern.

I'd have to figure out how to do it without the pictures I guess, but as for now, I'll write it out of my game, although it is an awesome addition to any game.

Thank you both,
~Trevor
TLarch: Well it's good you found the solution to your problem. It's unfortunate though, that you had to choose, but I would have picked the ABS too. :P Good luck in your future endeavors.
your first tutorial and you already brought the smile on my face :lol:
My result is not the best... http://sv.tinypic.com/view.php?pic=2lvjudk&s=3
So both NemanjaT and Gary 10000k have Necroposted, by almost a year, and then by 3-4 months...

Necroposting is bad, don't do it.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=21314