
EDuke32 Scripting "CON coding help"
#922 Posted 20 September 2012 - 04:23 AM
#923 Posted 20 September 2012 - 04:26 AM
Helixhorned, on 20 September 2012 - 12:48 AM, said:
But you'd lose a lot of the accuracy that way (rotation). It would be better to use something similar to the z parameter so 32768 is half, 65536 is a full rotation if you want it to be flawless. However I believe you're correct and the current pitch/yaw/roll parameters accept/use -1024 to 1024
#924 Posted 20 September 2012 - 04:15 PM
RichardStorm, on 20 September 2012 - 04:23 AM, said:
I believe you need to add code so that when any actor is hit by one, it shoots another one with the same values gathered from the ht* members.
#925 Posted 20 September 2012 - 06:56 PM
Hendricks266, on 20 September 2012 - 04:15 PM, said:
That's correct unless you do weird tricks like change the spritestat to actor, move the actor, and then change it back to a projectile. But now I've just confused the situation.
#926 Posted 21 September 2012 - 12:08 AM
Hendricks266, on 20 September 2012 - 04:15 PM, said:
True, I did something like that with hitscan to make a Railgun. It worked very well in the end.
By the way, the Railgun in Shadow Warrior is veeery lame, while the trail spawns behind any actor (until it hits a wall), the shoot itself stops when it hits the first obstacle. So it gives the illusion of piercing, but in reality he doesn't do that.
#927 Posted 21 September 2012 - 12:16 AM
Fox, on 21 September 2012 - 12:08 AM, said:
This is sadly true. I wanted to test the Railgun's capabilities so I made a test map with a ninja of every SW sprite pal (0-32) lined up in a very narrow corridor, with a dead end on one end and a window with a raised ledge on the other so I could shoot them with impunity. I was very disappointed when they took 33 shots to kill.
#928 Posted 21 September 2012 - 12:31 AM
#929 Posted 21 September 2012 - 02:05 AM
This post has been edited by RichardStorm: 21 September 2012 - 02:57 AM
#931 Posted 21 September 2012 - 03:45 AM
Quote
#932 Posted 21 September 2012 - 04:04 AM
But I meant to make a timed projectile with animation.
This post has been edited by Fox: 21 September 2012 - 04:05 AM
#933 Posted 21 September 2012 - 07:38 AM
This post has been edited by RichardStorm: 21 September 2012 - 07:38 AM
#934 Posted 21 September 2012 - 10:49 AM
To make a projectile with animated frames, use a code like this:
onevent EVENT_GAME ifactor PROJ { ifaction PROJFRAME1 { ifactioncount 1 action PROJFRAME2 } else ifaction PROJFRAME2 { ifactioncount 1 action PROJFRAME3 } (...) } endevent
#935 Posted 21 September 2012 - 01:01 PM
I already found how to make an animated projectile, anyway

#936 Posted 21 September 2012 - 03:25 PM
#937 Posted 21 September 2012 - 03:48 PM
This post has been edited by RichardStorm: 21 September 2012 - 03:48 PM
#938 Posted 21 September 2012 - 03:58 PM
The reason why the projectiles explode on you is simply because the speed of the player surpasses the projectile, making them collide.
#939 Posted 21 September 2012 - 04:09 PM
state wep_devastator ... ifvare w_count 5 ifvarg ammo_devast 0 // w_count = player.kickback_pic { shoot MINIROCKET subvar ammo_devast 1 setvar recoilstrength 15 sound DEVAST_FIRE1 } // the 2nd rocket ... setvar WEAPON4_FLAGS 0 setvar WEAPON4_FIREDELAY 3 setvar WEAPON4_TOTALTIME 6 setvar WEAPON4_SHOTSPERBURST 1 setvar WEAPON4_SHOOTS MINIROCKET // the 1st rocket .... ends
This post has been edited by RichardStorm: 21 September 2012 - 04:10 PM
#940 Posted 22 September 2012 - 01:41 PM
I mean something like when you move forward you more jump than actually walk. And when jumping you can jump higher than normal and sink slowly back to the ground.
Is something like this possible with EDuke32 and what do I have to look for?
#941 Posted 22 September 2012 - 02:28 PM
#942 Posted 22 September 2012 - 02:36 PM
I used that as a guide when I implemented a similar effect. There was also one for preventing fall damage (necessary for some of this and adds potential to exploit the mechanic in the level design) but keep in mind you will need to modify these somewhat to make them do what you want.
As for modifying player movement... I can't be much help there because everything I've tried to to in relation to the players walking has had no effect.
#943 Posted 22 September 2012 - 02:57 PM
High Treason, on 22 September 2012 - 02:36 PM, said:
#944 Posted 30 September 2012 - 02:19 PM
for example, duke could lose a weapon in the game. ?... when the weapon is empty or a monster steals a weapon ?...
#945 Posted 30 September 2012 - 02:31 PM
zazo, on 30 September 2012 - 02:19 PM, said:
for example, duke could lose a weapon in the game. ?... when the weapon is empty or a monster steals a weapon ?...
Yes. Set the relevant player struct members. For example, if the weapon lost is the chaingun (weapon 3), then you could use the following code:
setplayer[THISACTOR].gotweapon 3 0 // player no longer has the chaingun setplayer[THISACTOR].curr_weapon 0 // sets current weapon to mighty boot setplayer[THISACTOR].ammo_amount 3 0 // takes chaingun ammo as well (optional)
You will need to use a variable if you want the weapon taken to be the current one, rather than a certain number.
#946 Posted 30 September 2012 - 02:56 PM
This post has been edited by zazo: 30 September 2012 - 02:59 PM
#947 Posted 30 September 2012 - 03:03 PM
zazo, on 30 September 2012 - 02:56 PM, said:
ifvare player[THISACTOR].ammo_amount 2 0 { // do stuff }
That will execute the code in brackets when shotgun ammo is 0.
#948 Posted 30 September 2012 - 03:14 PM
Trooper Dan, on 30 September 2012 - 03:03 PM, said:
ifvare player[THISACTOR].ammo_amount 2 0 { // do stuff }
That will execute the code in brackets when shotgun ammo is 0.
Thanks
#949 Posted 01 October 2012 - 09:09 AM
zazo, on 30 September 2012 - 03:14 PM, said:
possible to compare 2 variables :
for example: ifvarn variable1 variable2 { do stuff }
.. ?
seems not tp work
#951 Posted 01 October 2012 - 04:26 PM
blizzart, on 22 September 2012 - 01:41 PM, said:
I mean something like when you move forward you more jump than actually walk. And when jumping you can jump higher than normal and sink slowly back to the ground.
Is something like this possible with EDuke32 and what do I have to look for?
Grab the values for posxv and posyv and divide them by 2 (for example). Slowing movement really is that simple (assuming you don't want to otherwise modify runningspeed). Also in EVENT_JUMP you can subtract from poszv to get a higher jump (there's a few ways of attacking that actually, but that might be the easiest).