Quote
EDuke32 Scripting "CON coding help"
#931 Posted 21 September 2012 - 03:45 AM
#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).
#952 Posted 02 October 2012 - 04:09 PM
Reaper_Man, on 18 September 2012 - 09:59 PM, said:
Curious if these have been implemented yet (been following the svn changelog but wasn't sure if I missed it).
Also, EVENT_PREGAME still seems jacked with non-hitscan weapons.
#953 Posted 06 October 2012 - 08:55 AM
#955 Posted 06 October 2012 - 10:56 AM
How to implement a variable for all the maps of a gameplay, and display the inventory "number of coins" on the screen above the status bar ?...
command to write and draw on the screen ?...
#956 Posted 06 October 2012 - 11:29 AM
gamevar coins 0 1
2. This is where events come in handy. Try EVENT_DISPLAYREST and digitalnumber.
onevent EVENT_DISPLAYREST digitalnumber DIGITALNUM 20 159 coins 0 0 8 0 0 xdim ydim endevent
#957 Posted 07 October 2012 - 02:40 PM
Hendricks266, on 06 October 2012 - 11:29 AM, said:
gamevar coins 0 1
2. This is where events come in handy. Try EVENT_DISPLAYREST and digitalnumber.
onevent EVENT_DISPLAYREST digitalnumber DIGITALNUM 20 159 coins 0 0 8 0 0 xdim ydim endevent
Is it possible to display a typo smaller: like the command "quote" (tiles 2837...) or possible to resize the digitalnum ?
I would also create two cool stuffs:
-a special item that reveals the whole map: the equivalent of the cheat code "dnshowmap"
-I'd like to know how to reproduce the effect of slow motion that exists in the tc "amc": action is slowed when the screen is full of action or killing a boss...
Thank you in advance
#958 Posted 07 October 2012 - 02:53 PM
zazo, on 07 October 2012 - 02:40 PM, said:
digitalnumberz can resize the number. If you want to display text you can use gametext/gametextz or minitext. If you want to include numbers in the text, use qsprintf to assemble the quote.
zazo, on 07 October 2012 - 02:40 PM, said:
Copy the code for one of the items or pickups in the original CONs, like ATOMICHEALTH. Instead of adding health, have it:
setuserdef[THISACTOR].showallmap 1
zazo, on 07 October 2012 - 02:40 PM, said:
The command for this is inittimer.
zazo, on 07 October 2012 - 02:40 PM, said:
No problem!
#959 Posted 08 October 2012 - 06:41 AM
Hendricks266, on 07 October 2012 - 02:53 PM, said:
Copy the code for one of the items or pickups in the original CONs, like ATOMICHEALTH. Instead of adding health, have it:
setuserdef[THISACTOR].showallmap 1
The command for this is inittimer.
No problem!
the bullet time effect is a very cool stuff !!
#960 Posted 09 October 2012 - 08:48 AM
This new projectile would have the effect of paralyzing the player body:
for the time of paralysis :
setplayer[THISACTOR].posx x
setplayer[THISACTOR].posy y
getplayer[THISACTOR].posx x
getplayer[THISACTOR].posy y
but how to disable the firing key to prevent the player to shoot ?...