Creating LOS or flashlight shadow

code
‮edoc
code⁣

#61

(just realized it doesn’t look like that small of an edit but it’s pretty quick to implement)

  1. Put all the rules that are related to moving and collisions in a custom rule
  2. Change the “return back” rule to set a variable to 1, and add a new rule that does the same thing as “return back” did but when “variable=1”, and a rule that says “when variable=1 set variable to 0”. Put these two rules outside the custom rule.
  3. Fill the screen with a color/clear the screen every frame. The original object or another object should do this, otherwise it will fill over what the clones drew.
  4. Spam add the custom rule until it updates smoothly every frame.

For the drawing blocks you’ll need to do it in a special way:


(add a check once if block if it only should draw under certain conditions)
This just makes sure that the draw block is able to execute every frame.


#62

Sorry for replying so late… But @CreationsOfaNoob what do you mean by the custom rule? Which one?
@Hopscotcher can you help with this?


#63

one sec I’m in 3 places at once


#64

Ok lol I can wait


#65

He/she just means to add the custum rule a bunch until it works.


#66

Which one though? I don’t know which one COAN is talking about


#67

This is the custum rule they meant


#68

Ok I’ll try that


#69

A wild @Writer_Lillian has been spotted liking our posts!


#70

oh no, I’ve been spotted!!


#71

ha
go to a gt


#72

runs back into the trees


#73

And I will go to my natural habitat

bye gtg


#74

I tried what @CreationsOfaNoob said to do, but it only does this…
https://c.gethopscotch.com/p/1014amokfv

Can anyone help? @CodeHelp


#75

You just forgot to put the move block inside the custom rule. Then you’ll have to keep adding the custom rule until the project looks smooth and doesn’t glitch.

You should also change the draw a trail block to this:


This is to fix a timing issue in Hopscotch itself.

And, to make it easier to add more of the custom rule, you can do like this:


#76

Ah ok I’ll see if I can fix it


#77

@CreationsOfaNoob
I tried that, but it still doesn’t work. Do I need more of the collision rules?
Link


#78

How many do you have?
Edit: you didn’t put the move block inside the collision rule. Doing that fixes it, together with adding even more collision x5

Edit #2: add ”when Start =1 and Hit = 0” to the rule with the move block

Edit #3: the Draw rule needs to look exactly like the picture, its kinda weird but doesn’t work otherwise.


#79

Ok I’ll do thst! Thanks for the help so far


#80

@CreationsOfaNoob I think I did everything, but it doesn’t do it still… what am I doing wrong? When you say “put the move block in the collision rule”, what do you mean by that?