SphereCommunity
Jump System - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Jump System (/Thread-Jump-System)



Jump System - rastrero - 01-14-2016 02:53 AM

Hi. I did an awsome jump system (instead teleport)
But the animation is so slow. I want to make it faster.

Is there a way to execute 3 functions on an object separates for 0,1 sec from each other?

I mean.

wait 0,1
command
wait0,1
command
wait0,1
command

I tried many ways but it not as fast i want.. ty


RE: Jump System - zottolo - 01-14-2016 03:04 AM

i don't know about any function that can execute fractions of seconds...actually you want something really fast so could it be

Code:
[function xxx]
command
yyy

[function yyy]
command
zzz

[function zzz]
command

hope is not too fast...


RE: Jump System - Kanibal - 01-14-2016 03:10 AM

Try this ^_^
Code:
[FUNCTION f_jump_system_a]
src.sysmessage Dear player! Please wait 0,1s and type f_jump_system_b in your game window and press ENTER. Best regards Admin.
command

[FUNCTION f_jump_system_b]
src.sysmessage Dear player! Please wait 0,1s and type f_jump_system_c in your game window and press ENTER. Best regards Admin.
command
......

PROFIT!



RE: Jump System - rastrero - 01-14-2016 03:11 AM

(01-14-2016 03:04 AM)zottolo Wrote:  i don't know about any function that can execute fractions of seconds...actually you want something really fast so could it be

Code:
[function xxx]
command
yyy

[function yyy]
command
zzz

[function zzz]
command

hope is not too fast...

Buddy i appreciate your efforts,
Aprecio el tuo esforto Tongue
But really, u dont have the lvl to answer any of my request. And I know it cos im answering ur request and they are so basic. Dont waste ur time. The thing u put is not able to work and dosnt solve anything xD
If u do that, server will execute the 3 in order almost at the same time, so u would only see the last fnuctions that is the last part of the animation. But nice try anyway.

(01-14-2016 03:10 AM)Kanibal Wrote:  Try this ^_^
Code:
[FUNCTION f_jump_system_a]
src.sysmessage Dear player! Please wait 0,1s and type f_jump_system_b in your game window and press ENTER. Best regards Admin.
command

[FUNCTION f_jump_system_b]
src.sysmessage Dear player! Please wait 0,1s and type f_jump_system_c in your game window and press ENTER. Best regards Admin.
command
......

PROFIT!

Is this a serius forum? U wanna be a people person? go to yahho chats to do jokes ty. Seems u got lot freetime. seriusly. will not work. is not funny. but ty for answer


RE: Jump System - Kanibal - 01-14-2016 03:22 AM

(01-14-2016 03:11 AM)rastrero Wrote:  Is this a serius forum? U wanna be a people person? go to yahho chats to do jokes ty. Seems u got lot freetime. seriusly. will not work. is not funny. but ty for answer

There is no "wait" command in sphere. You can download source code and write it youself. Seriusly.


RE: Jump System - rastrero - 01-14-2016 03:28 AM

I know there is no wait command but there are timers... 4 example. U could writte this or somehing like this.

[function start_jump]
timerf 0.1,f_jump 1

[f_jump]
if <args><3
animation_<args>
timerf 0.1,f_jump <eval <args>+1> //your no existing wait command...
else
Animation_<args>
endif

This simple script make what i want. But the timer get 1 sec to trigger, not 0.1.


RE: Jump System - karma - 01-14-2016 03:37 AM

You can use a memory item, with TIMER (will fire @Timer after <TIMER> seconds) or TIMERD (fire @Timer after <TIMERD> tenths of second) property.

Code:
[ITEMDEF i_memory_jump]
ID=02007
TYPE=t_eq_script
NAME=Memory (jump)

ON=@Timer
DOSWITCH <MOREX> //DOSWITCH begins counting from 0, and if i don't have set any MOREX property, it's zero by default
function_1
function_2
function_3
ENDDO
IF (<MOREX> > 3)
REMOVE
ELSE
MOREX ++
TIMERD=1
ENDIF
RETURN 1

When you want to activate this stuff you can do:
Code:
SERV.NEWITEM i_memory_jump,1,<UID of the CONT>
NEW.TIMERD=1



RE: Jump System - Coruja - 01-14-2016 03:37 AM

since its not recommended set timers directly on chars, you must use an memory item with TIMERD

Code:
[FUNCTION lol]
SERV.NEWITEM i_memory_lol
NEW.EQUIP

[ITEMDEF i_memory_lol]
ID=i_memory
TYPE=t_eq_script

ON=@Equip
MORE=3
TIMERD=1

ON=@Timer
IF (<MORE>)
  CONT.SAY <MORE>
  TIMERD=1
  MORE -= 1
ELSE
  REMOVE
ENDIF
return 1



RE: Jump System - rastrero - 01-14-2016 03:42 AM

(01-14-2016 03:37 AM)Coruja Wrote:  since its not recommended set timers directly on chars, you must use an memory item with TIMERD

Code:
[FUNCTION lol]
SERV.NEWITEM i_memory_lol
NEW.EQUIP

[ITEMDEF i_memory_lol]
ID=i_memory
TYPE=t_eq_script

ON=@Equip
MORE=3
TIMERD=1

ON=@Timer
IF (<MORE>)
  CONT.SAY <MORE>
  TIMERD=1
  MORE -= 1
ELSE
  REMOVE
ENDIF
return 1

Ty buddy. I got it in a t_eq_script like u put, that was was just and example for the troll kanibal.

hmm I knew about timerd But forget it at all.. I think i have never try it dont know why..

Ill try tomorrow and will put my results. Ty Coruja.