English Moving sprites

2 replies
Goto Page
To the start Previous 1 Next To the start
13.08.15 07:04:55 am
Up
HoOtix
User
Offline Off
Hello. Today I'm here to ask the community a simple question.
Yes, simple. But I don't know it.... Anyways, How do you make the sprites move smoothly using... 'Trigger_Delay' Thank you.
HoOtixGaming
13.08.15 08:13:06 am
Up
Fraizeraust
Moderator
Offline Off
You have to use cs2d entity env_sprite, changing its Rotation speed value and trigger it with Trigger_Delay.
16.08.15 11:03:28 am
Up
DC
Admin
Offline Off
I think user Fraizeraust's answer is a bit confusing because he didn't go much into detail... so:

The short answer is: You can't do that. cs2d entity env_sprite entities are not designed to be moved at all during runtime.

There are two ways to achieve what you want to do:

• Use Lua map scripts and cs2d lua cmd image instead of cs2d entity env_sprite. cs2d lua cmd image has tween commands like cs2d lua cmd tween_move which do exactly what you want.

• If you REALLY don't want to use Lua you can use an ugly fallback solution with entities and triggering only but this one is a ton of annoying work (clearly not recommended): Create X env sprite entities with the same image and move every one a little bit further. Hide them all at start. Now you have to trigger them in a row with a ton of cs2d entity trigger_delay so that only one is shown at a time.

e.g.:
• sprites: A, B, C, D ..., all hidden at start except for A
• delays: 1, 2, 3, 4, ...
• trigger delay 1 to start fake movement. It triggers A, B and 2 (hides A, shows B and triggers next step)
• 2 triggers B, C and 3
• 3 triggers C, D and 4
• and so on

This way you create the illusion of movement. But: cs2d entity trigger_delay is currently restricted to second precision so it won't be smooth.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
To the start Previous 1 Next To the start