Community

SCI Programming => SCI Syntax Help => Topic started by: ditikos on February 21, 2016, 05:26:25 AM

Title: Drawing lines, shapes etc with the character as a starting point.
Post by: ditikos on February 21, 2016, 05:26:25 AM
I am looking for a script to draw a line (or more) from the character to a point on the screen like a rope. Once the character reaches that point it could disappear or wait to be picked up.

Or having a square drawn to him like a teleporter.

Is there such a functionality?
Title: Re: Drawing lines, shapes etc with the character as a starting point.
Post by: Kawa on February 21, 2016, 05:38:38 AM
For arbitrarily-angled lines, the polygon writer utility comes to mind. I'll look into it when I finish this bath.

I completely forgot about this after I finished my bath. The polygon writer utility let me down. But whatever, I was working from false assumptions anyway. Either way, (Graph grDRAW_LINE y1 x1 y2 x2 [visualColor priColor ctlColor]) can be used to render the actual line.
Title: Re: Drawing lines, shapes etc with the character as a starting point.
Post by: troflip on February 21, 2016, 05:45:35 PM
You'll probably need to do a grSAVE_BOX and a grRESTORE_BOX too, if you want to erase the line and restore what was in the background after you're done with it.
Title: Re: Drawing lines, shapes etc with the character as a starting point.
Post by: ditikos on February 29, 2016, 05:28:09 AM
Hi, thanks for your help.

Would you suggest this as drawing a polyline or using some assets to render it?
What I am trying to do on the long run is a rope on a hook throw to a direction.
Title: Re: Drawing lines, shapes etc with the character as a starting point.
Post by: troflip on February 29, 2016, 01:14:27 PM
I would suggest using a view for this. It's a lot less flexible, but it plays much nicer with the engine.