Forum

> > CS2D > Scripts > Search solutions from DC and scripters
Forums overviewCS2D overview Scripts overviewLog in to reply

English Search solutions from DC and scripters

20 replies
Page
To the start Previous 1 2 Next To the start

Poll Poll

How do you think, it useful to create an questions information base?

Only registered users are allowed to vote
Yes, it will be useful for searching.
75.00% (9)
No, it is absolutely not necessary.
16.67% (2)
I do not care.
8.33% (1)
12 votes cast

old Poll Search solutions from DC and scripters

Pagyra
User Off Offline

Quote
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

old I found the solution

Pagyra
User Off Offline

Quote
This code works
1
2
parse("explosion "..(effect.x).." "..(effect.y).." 32 0 "..id)
parse("shake "..id.." 0")

old Explosion shake

KimKat
GAME BANNED Off Offline

Quote
Built-in effects cannot be disabled as user DC stated, so the partial Lua user 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.

old Re: Search solutions from DC and scripters

Pagyra
User Off Offline

Quote
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, ...)?

old Re: Search solutions from DC and scripters

DC
Admin Off Offline

Quote
@previous question: I forgot about the command cs2d cmd 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.

old Re: Search solutions from DC and scripters

Pagyra
User Off Offline

Quote
user DC has written
@previous question: I forgot about the command cs2d cmd 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?

old Re: Search solutions from DC and scripters

DC
Admin Off Offline

Quote
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!?

old Re: Search solutions from DC and scripters

DC
Admin Off Offline

Quote
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.

old Re: Search solutions from DC and scripters

Pagyra
User Off Offline

Quote
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.

old Re: Search solutions from DC and scripters

DC
Admin Off Offline

Quote
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:
1
feetrot=ATan2(-mx,my)
with:
mx = movement on x axis (newx - oldx)
my = movement on y axis (newy - oldy)

old Re: Search solutions from DC and scripters

Pagyra
User Off Offline

Quote
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
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview