Author Topic: Drawing lines, shapes etc with the character as a starting point.  (Read 5845 times)

0 Members and 1 Guest are viewing this topic.

Offline ditikos

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?



Offline Kawa

Re: Drawing lines, shapes etc with the character as a starting point.
« Reply #1 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.
« Last Edit: February 21, 2016, 05:41:43 PM by Kawa »

Offline troflip

Re: Drawing lines, shapes etc with the character as a starting point.
« Reply #2 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.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline ditikos

Re: Drawing lines, shapes etc with the character as a starting point.
« Reply #3 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.

Offline troflip

Re: Drawing lines, shapes etc with the character as a starting point.
« Reply #4 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.
Check out my website: http://icefallgames.com
Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.023 seconds with 18 queries.