Duke4.net Forums: EDuke32 Scripting - Duke4.net Forums

Jump to content

  • 120 Pages +
  • « First
  • 24
  • 25
  • 26
  • 27
  • 28
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Diaz 

#751

That worked, thanks! I thought that parameter was just related to the "locked" or "unlocked" quotes and wasn't very important, but looks like it is...
0

User is online   Danukem 

  • Duke Plus Developer

#752

View PostDiaz, on 12 March 2012 - 08:55 AM, said:

That worked, thanks! I thought that parameter was just related to the "locked" or "unlocked" quotes and wasn't very important, but looks like it is...


Well it's important insofar as players that don't exist can't activate shit. :)
0

User is offline   Diaz 

#753

well yeah lol... I just thought that parameter wasn't about who activates stuff, but just who gets to see the quote :)
0

#754

When I draw a fullscreen (320x240 in 8-bit) image on the screen it is in 4:3 format and not widescreen, because I want it to stretch over the screen. I could be wrong but I thought that they used widescreen in AMC TC to draw the screens, that worked. Turning widescreen on in the video options doesn't help. Is this some kind of script or con code?

Thanks for helping me out :)
0

User is offline   Mblackwell 

  • Evil Overlord

#755

Let me explain a bit:

320x240 = 4:3

Duke actually uses 320x200 which is 16:10. Then it does some weird crap and stretches that to fit in various 4:3 resolutions.

So first start there, make your graphic the correct 320x200 resolution and that will "fill the screen" on a 4:3 res. Then in rotatesprite (or myospal or whatever) set your orientation to 1024. Note that this will distort the image, but it WILL cover the screen.

Setting widescreen has no effect on graphics that weren't displayed with orientation 1024 set.
2

#756

Ah thanks a lot Mblackwell. And yeah, I wasn't sure if my picture was 320x240 or 320x200. I just wanted it to stretch over the screen :) Thanks again for the help, work perfectly now!
0

User is offline   Diaz 

#757

A quickie:

Is it possible to make it so enemies (hardcoded and useractor enemy) do NOT light themselves up when firing projectiles?

Right now I'm making them notenemy but ofcourse there are some drawbacks, like autoaim not working on them...
0

User is offline   Mblackwell 

  • Evil Overlord

#758

View PostDiaz, on 25 March 2012 - 04:46 AM, said:

A quickie:

Is it possible to make it so enemies (hardcoded and useractor enemy) do NOT light themselves up when firing projectiles?

Right now I'm making them notenemy but ofcourse there are some drawbacks, like autoaim not working on them...


For the polymer lights Htflags should theoretically do it.

Also... I'm not sure how not being able to autoaim at enemies is a drawback
0

User is offline   Jblade 

#759

I think he means how to make the enemies not light up as in shade 0, not polymer lights - I *think* it might be worth trying getting the sector's shade and applying it constantly whilst the enemy is shooting, but I'm not that sure.
0

User is offline   Mblackwell 

  • Evil Overlord

#760

View PostJames, on 25 March 2012 - 06:35 AM, said:

I think he means how to make the enemies not light up as in shade 0, not polymer lights - I *think* it might be worth trying getting the sector's shade and applying it constantly whilst the enemy is shooting, but I'm not that sure.



Shooting a projectile doesn't light anything up though (at least if it's notenemy). The exception to this is polymer, because things like SHOTSPARK1 are coded to cause a light to spawn.
0

User is offline   Jblade 

#761

View PostMblackwell, on 25 March 2012 - 06:45 AM, said:

Shooting a projectile doesn't light anything up though (at least if it's notenemy). The exception to this is polymer, because things like SHOTSPARK1 are coded to cause a light to spawn.

Yeah an enemy actor does become fullbright if they're firing a shotspark weapon, I thought that was what he meant.
0

User is offline   Plagman 

  • Former VP of Media Operations

#762

Right, he just said notenemy fixed it.. He wants the shade to remain constant for enemies.
0

User is offline   Mblackwell 

  • Evil Overlord

#763

View PostPlagman, on 25 March 2012 - 06:53 AM, said:

Right, he just said notenemy fixed it.. He wants the shade to remain constant for enemies.


Setting the shade manually would be the only way to do it then afaik.
0

User is offline   Diaz 

#764

Yeah, that's what I was talking about. So it's the shade value that needs to change? I'll see if I can get it manually adjusted...

This post has been edited by Diaz: 25 March 2012 - 07:26 AM

0

User is online   Danukem 

  • Duke Plus Developer

#765

View PostDiaz, on 25 March 2012 - 07:25 AM, said:

Yeah, that's what I was talking about. So it's the shade value that needs to change? I'll see if I can get it manually adjusted...


Are these enemies you are having the problem with on the regular enemy tile numbers (like PIGCOP, LIZMAN, etc.)?
0

User is offline   Diaz 

#766

Yes and no. I want every enemy model to be lit only by a Polymer light when shooting, instead of getting a shade value.

Some enemies are regular tile numbers, and others are useractors. Behavior seems to be the same.

By the way, setting the shade of the sprite to current sector's floorshade in the actor code doesn't seem to work (I guess the hardcoded shading is applied after my code so it has no effect)

EDIT: Nevermind, setting the shade in EVENT_GAME does work. Marvelous! :)

This post has been edited by Diaz: 25 March 2012 - 01:38 PM

0

#767

Setaspect seems broken. Or this is what i think. I used it some years ago and it worked but now it does nothing. I tried it as with vars as with defined values.


onevent EVENT_DISPLAYREST
....
setvarvar temp ydim  divvar temp  5  mulvar temp 524288
divvarvar temp xdim   
setaspect 32768 temp
// or
setaspect 32768 78644  // being 78644 the right value for 4:3 ... for my 5:4 screen it's 83866 but it doesn't change anything.

endevent
 


What is wrong ?

This post has been edited by RichardStorm: 27 March 2012 - 11:13 AM

0

#768

I can tell you that setaspect is working because i have been toying with it this past week. Do you have the latest eduke?
0

User is offline   Marcos 

#769

setaspect only works in EVENT_DISPLAYROOMS.
1

#770

Oh yea, i thought he was actually in that event. REST and ROOMS -.-
0

#771

Quote

setaspect only works in EVENT_DISPLAYROOMS


Hell yeah! It works... tks
0

#772

View Postmarcolino123, on 27 March 2012 - 09:31 AM, said:

setaspect only works in EVENT_DISPLAYROOMS.

This command is useful in other display events as well if you want to stretch things shown via rotatesprite and similar commands. For instance, setaspect 32768 65536 removes the unwanted vertical stretching what is crucial for proper rotation.
0

User is online   Danukem 

  • Duke Plus Developer

#773

View PostCraigFatman, on 28 March 2012 - 07:21 PM, said:

This command is useful in other display events as well if you want to stretch things shown via rotatesprite and similar commands. For instance, setaspect 32768 65536 removes the unwanted vertical stretching what is crucial for proper rotation.



That's good to know. I HATE that vertical stretching; it has ruined so many graphics for me. But does that work in all renderers?
0

User is offline   Superthijs 

#774

How do I unblock a sprite in code?

This post has been edited by Superthijs: 03 April 2012 - 04:53 AM

0

User is offline   Mblackwell 

  • Evil Overlord

#775

http://wiki.eduke32.com/wiki/Cstat

eg:
cstat 0
or
setactor[THISACTOR].cstat 0
0

User is offline   Superthijs 

#776

Yeah, I know, sorry, I should have explained a little bit more. :)
I actually mean that, if the cstat is 14, 52 or 25, or something like that, I want to subtract 1 of the cstat.
So I need to check if the sprite is blocked or not.

This post has been edited by Superthijs: 03 April 2012 - 05:00 AM

0

User is offline   Helixhorned 

  • EDuke32 Developer

#777

andvar X 0xFFFFFFFE

This is proposed by CraigFatman, but I find the "obvious" version easier to read (and unlikely to be different performance-wide unless used in a tight loop):
ifandvar X 1
   subvar X 1

0

User is offline   Hendricks266 

  • Weaponized Autism

  #778

View PostHelixhorned, on 03 April 2012 - 05:10 AM, said:

andvar X 0xFFFFFFFE

This is proposed by CraigFatman, but I find the "obvious" version easier to read (and unlikely to be different performance-wide unless used in a tight loop):
ifandvar X 1
   subvar X 1


DT suggested:
ifandvar X 1
   xorvar X 1


It would be easier if we had nandvar, I think.

This post has been edited by Hendricks266: 03 April 2012 - 03:14 PM

0

User is offline   Diaz 

#779

View PostSuperthijs, on 03 April 2012 - 05:00 AM, said:

Yeah, I know, sorry, I should have explained a little bit more. :)
I actually mean that, if the cstat is 14, 52 or 25, or something like that, I want to subtract 1 of the cstat.
So I need to check if the sprite is blocked or not.


Use getactor[THISACTOR].cstat CSTAT to get the cstat into a variable called CSTAT. Then you can check if it's already blocking or not by using ifvaror CSTAT 1.
If not, just add 1 to the variable and use setactor[THISACTOR].cstat CSTAT to set the updated value.
0

#780

It's ifvarand if i remember correctly.
0

Share this topic:


  • 120 Pages +
  • « First
  • 24
  • 25
  • 26
  • 27
  • 28
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options