Go Back   Savage 2: A Tortured Soul Forum > Savage 2 Modding > Documentation

Notices

Documentation Post useful tutorials and other informative material.

Reply
 
Thread Tools Display Modes
Old 12-27-2010, 02:20 AM   #31
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

Maybe a away to take gold away from a team?

Quote:
<button color="invisible" onclick="CommanderGiveGold('{index}', '-2', '250');" onmouseover="ShowWidget('teammanager_tip_givegold' );" onmouseout="HideWidget('teammanager_tip_givegold') ;">
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...

rohezal is offline   Reply With Quote
Old 12-28-2010, 06:37 PM   #32
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

At the first time this trigger slot 16 will be empty (a token of life is [?] there). This is cool because I need an empty slot, but strange behaviour. When it triggers more then once there will be a minor potion.

CastSpell #GetIndexFromClientNum(0)# Spell_Resurrect
GiveItem #GetIndexFromClientNum(0)# 16 Consumable_HealthMinor
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...

rohezal is offline   Reply With Quote
Old 01-09-2011, 01:38 AM   #33
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

The name of Background Image of the Loadscreen is <image texture="/ui/elements/shrine_back_2.tga" /> the other background is probably parchment.tga from textures file (there file extension dds) in game_loadout.xml in resouces0/ui.

If you want to spawn a dynamic prop to unstuck a player under the player (and set the player a bit higher), you get with SpawnEntityAtEntity the angles too, You have to reset them with SetAngels <id or name> 0 0 0 (see Stanz Editor ctrl + tab). But the collission surfaces wont rotare after spawning. So spawn a second dyn prop after your rotatet the first one and delete the first one.

Strange but it works^^
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...

rohezal is offline   Reply With Quote
Old 05-12-2011, 02:54 PM   #34
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

do you think the hit box of a dynamic prop moves (with setPosition) when you move the dynamic prop? NO! Can it be so hard to move a hitbox?

Edit: Should work with NPC (but they fall down due gravity i think, lets try it with a building).

Edit2: buildings dont work too...
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...


Last edited by rohezal; 05-12-2011 at 03:05 PM.
rohezal is offline   Reply With Quote
Old 05-12-2011, 04:06 PM   #35
PetzI

PetzI's Avatar
 
Join Date: Jun 2007
Posts: 1,815
Thanks: 18
Thanked 72 Times in 50 Posts
Default

Quote:
Originally Posted by rohezal View Post
do you think the hit box of a dynamic prop moves (with setPosition) when you move the dynamic prop? NO! Can it be so hard to move a hitbox?

Edit: Should work with NPC (but they fall down due gravity i think, lets try it with a building).

Edit2: buildings dont work too...
Get their health, remove them, recreate them at the new origin you want, set their health back.
PetzI is offline   Reply With Quote
Old 05-12-2011, 06:29 PM   #36
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

I wanted a moving entity (flying) which can be hitten during moving. It worked with a lot of scripting. In fact just some anims and a lot of setposition... worked even with waypoints in scripts^^ (but not thread able, must be copied for each moving object :'()
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...

rohezal is offline   Reply With Quote
Old 05-12-2011, 11:11 PM   #37
martyrsdeath

martyrsdeath's Avatar
 
Join Date: Nov 2010
Posts: 1,309
Thanks: 1
Thanked 12 Times in 5 Posts
Default

wouldn;t that end up overloading the server?

BTW. make hunters able to fly, and give them the rush thingy into the air, then u'll be da man
martyrsdeath is offline   Reply With Quote
Old 05-13-2011, 09:55 AM   #38
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

Its not for normal gameplay (a least I don't think it will be used for it), its for mods

I think the hunter could fly in the beta but they removed it.
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...

rohezal is offline   Reply With Quote
Old 05-17-2011, 01:29 PM   #39
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

CreateVar float _yaw #GetYaw(|#_sid|#)#
CreateVar float _pitch #GetPitch(|#_sid|#)#
SetClientAngles 0.0 0 #_adder#

...

S2 GAMES seems to use -180 to 180 degree instead of 360... WHY??? And why is this not documented :(?
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...


Last edited by rohezal; 05-17-2011 at 01:42 PM.
rohezal is offline   Reply With Quote
Old 05-17-2011, 07:46 PM   #40
rohezal

rohezal's Avatar
 
Join Date: Mar 2008
Posts: 2,610
Thanks: 112
Thanked 136 Times in 106 Posts
Default

Here is my code to look in the direction as an entity. It converts the -180 to 180 angels to 0-360 and then starts to calculate.

CreateVar int _target #GetScriptParam(target)#
CreateVar int _speed #GetScriptParam(speed)#

CreateVar float _pz #getyaw(|#_target|#)#
CreateVar int _sid #GetIndexFromClientNum(0)#
CreateVar float _yaw #GetYaw(|#_sid|#)#
CreateVar float _pitch #GetPitch(|#_sid|#)#
CreateVar float _counter 0
CreateVar float _adder 2
CreateVar float _diff 100

CreateVar int _sleepTime #GetScriptParam(sleeptime)#
if [_sleepTime < 1] "Set _sleepTime 25"

//set _pz [_pz % 360]
SendMessage -1 _yaw #_yaw# / _pz #_pz# / _diff #_diff#
if [_yaw < 0] "Set _yaw [_yaw + 360]"
if [_pz < 0] "Set _pz [_pz + 360]"

//if [_pz < _yaw-180] "set _adder -2"
CreateVar float _distance [_pz-_yaw]
if [_distance < 0] "Set _distance [_distance * -1]"

if [_distance>360] "SendMessage -1 Distance > 360 #_distance#. Something strange happened. _yaw #_yaw# / _pz #_pz#

if [_distance>180] "set _adder -2; Set _distance [360-_distance];"
if [_yaw > _pz] "Set _adder [_adder * -1]"

SendMessage -1 _yaw #_yaw# / _pz #_pz# / _diff #_diff#

@loop
if [_diff < 3] "goto end"
if [_counter > _distance] "goto end"
SendMessage -1 _yaw #_yaw# / _pz #_pz# / _diff #_diff# / distance #_distance# / counter #_counter#
SetClientAngles 0.0 0 #_adder#
set _counter [_counter+2]
if [_yaw > _pz] "set _diff [_yaw - (_counter+_pz)]"
if [_yaw < _pz] "set _diff [_pz - (_counter+_yaw)]"
sleep #_sleepTime#
goto loop

@end
__________________

http://xs229.xs.to/xs229/08295/image_get.php939.jpeg

I love VOIP
sing: "base, base, base, base, base, base, base"

Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...

One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...

rohezal is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:15 AM.