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

Jump to content

  • 124 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   m210® 

#744

I have problems with activating SE12 via CON commands.
operateactivators, operatemasterswitches, operaterespawns, operatesectors, activatebysector doesn't works for it. How to do this?
0

User is offline   CruX 

#745

View PostM210, on 02 March 2012 - 04:43 AM, said:

operateactivators, operatemasterswitches, operaterespawns, operatesectors, activatebysector doesn't works for it. How to do this?


Yeah, none of those commands will work because the lightswitch doesn't work with activators or sector tags (etc.) it all happens within the SE. That being said, you'd have to find some way to alter the SE to make it jive with checkactivatormotion or something like that. I don't mess around with SE's or really any of those actors so I can't help with that. If I were you, I'd just make a new actor that uses checkactivatormotion, then changes the floorshade of the sector it's in to a certain parameter defined in its hitag (or some other struct member like that) if the activator in motion equals a certain other struct member (lotag, extra, etc.)

And as long as I'm mentioning checkactivatormotion, is there some other sort of command I'm not aware of that checks the motion of a sector itself? I created an actor some time ago that would play two different, specific sounds for when a door opened and closed (like in Doom), but ATM it's using checkactivatormotion to keep tabs of when the door's actually opening and when it's closing, ergo every door that uses this actor HAS to be operated by a switch. I'd kind of like for it to also work with regular doors that you can open with the spacebar, but I can't find any command or check that would help with that.
0

User is offline   m210® 

#746

It's sadly that no way to make it, but anyway thanks. Probably have to make a sprite myself, although I don't want to do this :lol:
0

User is offline   m210® 

#747

And a second question, is there way to check ceilings on hits of radiusexplosion by projectiles?
that's very easy to get via bullets like this
getactor[THISACTOR].picnum picnum
ifvare picnum SHOTSPARK1 
{ 
	getactor[THISACTOR].htg_t 6 tmp
	ifvare tmp -1
	{
		getactor[THISACTOR].htg_t 7 sectorid
		getactor[THISACTOR].z sector_z1
		getsector[sectorid].ceilingz sector_z2
		ifvarvare sector_z2 sector_z1 {        }
	}
}


but I can't to make such code for projectiles...
because projectiles can damage ceilings even if it get into the wall

This post has been edited by M210: 02 March 2012 - 05:51 AM

0

User is offline   m210® 

#748

Ok, I made own LightEffector. The result is a very good tool. For example now I can highlight walls and floor only. And I made a new video with some effects on E1M2 from BloodTC.

And about mapster32 scripts. I got a one idea when I saw savegamevar
Maybe make those command for mapster32? Save a variable and value to file in m32 than call variable in the game?
0

User is offline   Diaz 

#749

Is operateactivators currently broken?

I've made an actor that is supposed to trigger activators whose lotag match the actor's hitag when it's killed (it's a monster). The code works fine bacause it prints out the debugging quote I've added, but it's not triggering the activators. Even if I set it to operate activators defined by a fixed number (just in case I'm not parsing the hitag correctly), it won't work.

    getplayer[THISACTOR].i TEMP
    checkactivatormotion HITAG
        ifvarn RETURN 1
        {
            quote 100
            operateactivators HITAG TEMP 
        }


This code is executed on the ifdead... section of the actor's ifhitweapon code.

This post has been edited by Diaz: 12 March 2012 - 08:01 AM

0

User is online   Danukem 

  • Duke Plus Developer

#750

Try using 0 instead of TEMP. You are putting the player sprite's ID number in there, but what you actually want is the player number, which is 0 in a single player game. In general, it never hurts to use 0 for that parameter in my experience.
0

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

Share this topic:


  • 124 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