My first question:
If I create an explosion near player - then player screen shakes.
How to remove this shaking? edited 3×, last 12.12.13 08:30:20 am
Admin/mod comment
Some request = very useless title! Use better titles in future! Be more specific! /DC DC Admin
Offline
It's not possible to disable this effect with scripts. This code works
1
2
parse("explosion "..(effect.x).." "..(effect.y).." 32 0 "..id)
parse("shake "..id.." 0")
Built-in effects cannot be disabled as
DC stated, so the partial Lua
Pagyra has provided just makes it possible as a workaround to get rid of this shaking effect visually while the fact still remains that the shaking still occurs after you've been affected by a explosion. However it can be silenced with a piece of Lua code just to explain how the process itself works. NEXT QUESTIONS:
1) How to change the image special values and tags (path,mode,...) ? (without recreating image)
2) How to create an image that is visible only for one player?
3) Is it possible to remove the effects of flamethrower, ground grenades and laser like projectiles (fire, smoke, sparks, ...)? DC Admin
Offline
@previous question: I forgot about the command
shake 
1) This is not possible unless there are commands which affect these values. I think path and mode can't be changed. Simply remove the image and create a new one. It's quite easy to write a function for that in Lua, copying the values from the first image and using them for the new one.
DC has written
@previous question: I forgot about the command
shake
1) This is not possible unless there are commands which affect these values. I think path and mode can't be changed. Simply remove the image and create a new one. It's quite easy to write a function for that in Lua, copying the values from the first image and using them for the new one.
Can you add lua command for function to manipulate entity values/strings in next version release of game client? DC Admin
Offline
The problem with this is that it clearly has the potential to break a looooot of stuff. I'll think about it. Dedicated server executing lua command "screenshot" or "snapshot" - show a critical error and closes itself.
How can I get a screenshot of current player? DC Admin
Offline
The dedicated server - of course - can't create screenshots because it doesn't run in graphics mode at all. It's just a console application to make it work on systems without GPU. I should disable this command for the dedicated server. Thanks for mentioning!
Edit: It actually is disabled for dedicated servers already!? DC Admin
Offline
Read the description carefully. parameter is only required for mode 4. It contains a file name/path for that case. I'll edit the description to clarify this. Where can I get the description strings for each entity?
How does work animation of legs? DC Admin
Offline
I don't know what you mean with "description strings". The leg animation is hardcoded. You can't influence it with Lua in any way. I want to simulate player, and thus want to understand how animation feet.
Different entity output different data in strings, for example weather entity strings are number:
type of weather effects, the power of the effect of weather. DC Admin
Offline
Unfortunately I never wrote a list about the entity values. It's in the source code only. I'll post a list here later.
Feet
1
2
3
4
5
6
7
8
9
10
11
12
'Draw Feet
pl.movedframe=0
SetAlpha palpha
SetBlend ALPHABLEND
SetColor 255,255,255
If pl.lastmove<=0 Then
	pl.feetframe=0
	pl.rotoffset=0
ElseIf GetAlpha()>0.7 Then
	SetRotation pl.feetrot
	DrawImage gfx_pl_feet,x-Sin(pl.rot)*5,y+Cos(pl.rot)*5,pl.feetframe
EndIf
feetframe is increased every 6 (+/- 1) frames (running) or every 12 (+/- 1) frames (walking) and reset to 0 if the player didn't walk for a while. It is wrapped to 0 if it goes beyond 7.
feetrot is set on every movement with:
with:
mx = movement on x axis (newx - oldx)
my = movement on y axis (newy - oldy) Thank you so much.
How to change image values like as path, mode, ... without recreating image?
For example, I created a image with value mode 132 but I want to change value mode to 3, or something like that for other values of the image.
How do I do this? edited 3×, last 10.04.14 06:48:41 pm