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

Jump to content

  • 115 Pages +
  • « First
  • 66
  • 67
  • 68
  • 69
  • 70
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   David B. 

#2011

View PostMark., on 01 August 2017 - 09:59 AM, said:

Make the lamp model with a 2 frames. Frame 1 will have the dark lens surface in front. Frame 2 will have the bright lens surface in front. In frame 1 the bright lens will be shrunk and behind the dull lens. In frame 2, the opposite. The dark lens will be behind the bright one. Then use your code of your choice for which frame will display. Its like how muzzle flashes are shrunk and hidden inside the mesh until they are needed.
I'm not sure if you mean double the meshes, then I would have two lampshades into the model with one textured brighter than the other ?
0

User is offline   Mark 

#2012

I thought it might be a simple lamp with a plastic lens that you could swap back and forth. But if its a lamp with fancy shade the switch between 2 shade meshes might be a viewable glitch. Instead, could you put a point light inside or outside the shade to light it when the switch is flipped? You are using Confetti, right?

This post has been edited by Mark.: 01 August 2017 - 11:59 AM

0

User is offline   David B. 

#2013

View PostMark., on 01 August 2017 - 11:57 AM, said:

I thought it might be a simple lamp with a plastic lens that you could swap back and forth. But if its a lamp with fancy shade the switch between 2 shade meshes might be a viewable glitch. Instead, could you put a point light inside or outside the shade to light it when the switch is flipped? You are using Confetti, right?
Yes I'm using it, I already tried to put a SE49 inside the lamp but it doesn't light it properly, the model lamp remains bleak.
0

User is online   Danukem 

  • Duke Plus Developer

#2014

View PostDavid B., on 02 August 2017 - 12:59 AM, said:

Yes I'm using it, I already tried to put a SE49 inside the lamp but it doesn't light it properly, the model lamp remains bleak.


You need to use spritenoshade on the lamp model tile number, then code the lamp to switch between normal shade value and full bright shade (-127) depending on whether it is "lit".
0

User is offline   Mark 

#2015

TD's idea is a good one. This is what I had in mind from my first post. I have no idea what your lamp looks like. Or if its on a table, wall or what. My idea works as long as the player does not have access to move 360 degrees around the lamp becasue the backside won't be lit. But then you could add a second small light to illuminate the backside. Tiny point lights like that don't bog framerate down. I don't mind the little hard ball of light because of the se being so close to the model.

Attached thumbnail(s)

  • Attached Image: LAMPSHADE.jpg


This post has been edited by Mark.: 03 August 2017 - 02:22 PM

0

User is offline   Kyanos 

#2016

I'd make two versions of the skin and switch between them. Changing the shade value is probably good, but you'd get more details into a second skin.
0

User is offline   David B. 

#2017

Here is the situation (see pics below) :

Even after placing some SE49 or 50 in the model, the lamp is not bright enough when it's "on", so I need to define a glow map and maybe working with two models, one has the glow, the other not.
But Confetti work with original switches from duke nukem and I don't know how they are hardcoded so to control the SE12.

Also I tried to add a script to the LIGHTSWITCH2 but this make it disappear from the game.
This was the script I started :

useractor notenemy LIGHTSWITCH2
	ifp pfacing ifcansee ifhitspace ifpdistl 512 {
		getactor[THISACTOR].pal SIGNAL_ON
	}
enda

My idea was getting the pal number of the switch and use it as a channel, and furtherly link it to the lamp with the same matching pal number (so the engine finds the right model in the map and changes its picnum when the global variable SIGNAL_ON is greater than zero).
That was the point.

Attached thumbnail(s)

  • Attached Image: mapster.jpg
  • Attached Image: comparaison.jpg


This post has been edited by David B.: 04 August 2017 - 06:21 AM

0

User is offline   David B. 

#2018

View PostDrek, on 03 August 2017 - 02:25 PM, said:

I'd make two versions of the skin and switch between them. Changing the shade value is probably good, but you'd get more details into a second skin.
Yes, I should change the pal number of the lamp model to change its skin (that's maybe easier than define two models with a glow map) ; but I don't know how to add a script to LIGHTSWITCH2 or how to make my own script with a custom lighswitch so this one will have the same ability to control the SE12. I don't know if it's clear...

This post has been edited by David B.: 04 August 2017 - 06:21 AM

0

User is offline   Jblade 

#2019

Easiest way I can think of doing it would be to check the shading of the sector that it's in and change the lamp based on that.

something like:
ifvarl sector[THISACTOR].floorshade 10 spritepal 3
else spritepal 0

Basically this would just detect if the sector is at a certain shade level (say under 10) and then change the sprite's skin to your lit version. You can of course change the 10 to whatever value you set the lit sector to. If this works and you want a more flexible version of the code, just ask again and I can whip something up for you.
1

User is offline   David B. 

#2020

View PostJblade, on 04 August 2017 - 11:04 AM, said:

Easiest way I can think of doing it would be to check the shading of the sector that it's in and change the lamp based on that.

something like:
ifvarl sector[THISACTOR].floorshade 10 spritepal 3
else spritepal 0

Basically this would just detect if the sector is at a certain shade level (say under 10) and then change the sprite's skin to your lit version. You can of course change the 10 to whatever value you set the lit sector to. If this works and you want a more flexible version of the code, just ask again and I can whip something up for you.
That's what I needed, this control the model with the floorshade. I didn't know that way. Thanks
1

User is offline   Zaxtor 

#2021

How do we replace this?

It comes after the final clips when u finish an EP etc.

How do we remove dis and ore replace it?
Posted Image

This post has been edited by Zaxtor: 19 August 2017 - 10:37 AM

0

User is online   Danukem 

  • Duke Plus Developer

#2022

View PostZaxtor, on 19 August 2017 - 10:37 AM, said:

How do we replace this?


I'm not sure, but it might be the NODUKETEAMTEXT bit on the predefined LOGO_FLAGS gamevar. You can declare it with a different value and see what happens.

http://wiki.eduke32....wiki/LOGO_FLAGS

Specifically, include this line in your var declarations:

gamevar LOGO_FLAGS 524544 0
0

User is offline   Zaxtor 

#2023

i tried, wont work.

if I put "gamevar LOGO_FLAGS 524544 0 " it disables all clips.

if I do
gamevar NODUKETEAMTEXT 524288 0
and

gamevar NODUKETEAMTEXT 524544 0
it wont work
0

User is online   Danukem 

  • Duke Plus Developer

#2024

I don't know if any of those bits actually disable that particular text, and I don't feel like testing it out. However, there are surely other solutions. If that text displays upon completion of a specific episode, then you can use CON commands to change the episode number when the player completes it, to prevent displaying it. You can use gametext or other commands to display your own text instead, before that point.
0

User is offline   Zaxtor 

#2025

My mode is on EP4
Cus EP4 accepts "level placements without warping you to wrong level when you hit nuke button after going through 3 secret levels etc, (sector you walk in to finish level etc).

Dunno if they fixed it on Duke's today standard.

I remember in Oblivion level placements on EP1 were "weird" to have more levels than the EP1 limit.

This post has been edited by Zaxtor: 19 August 2017 - 03:08 PM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #2026

gamevar LOGO_FLAGS 524543 0

255 (the default) plus 524288.
1

User is offline   Zaxtor 

#2027

Worked, thx.
Got rid of it.
Had to remove the musicname.voc to get rid of the duke music when was dark screen but music still present.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #2028

Does your mod have a DUKETEAM.ANM (or .IVF)?
0

User is online   Danukem 

  • Duke Plus Developer

#2029

View PostHendricks266, on 19 August 2017 - 04:56 PM, said:

gamevar LOGO_FLAGS 524543 0

255 (the default) plus 524288.


Oops I had added 256 instead of 255.
0

User is offline   Zaxtor 

#2030

neither has it.
Was gonna pic the arctic still pic, didn't work but scrapped it.

Ending is pretty long tho so is ok.
0

User is offline   Zaxtor 

#2031

when you lockplayer xx
it says (except the ability to look up/down with the mouse)
is there a locking code to temporarily lock mouse movements too?
0

User is offline   Mark 

#2032

This is from a conversation I had with someone not too long ago that might get you started in the right direction.
"you should setplayer[THISACTOR].weapon_pos 1 and also setplayer[THISACTOR].jumping_counter 0
and maybe setinput[].horz 0 maybe even setinput[].bits 0
should keep the player from doing anything when lockplayer is active
firing a gun or jumping
looking up and down
etc"
0

User is offline   Zaxtor 

#2033

with lock player during scene jump, weaps items, movement etc wont work (as suppose to)
i tried with horz and bits (inside player) no workin
like setinput[THISACTOR].horz 0
and other so nothing happens

This post has been edited by Zaxtor: 26 August 2017 - 01:24 PM

0

User is offline   Mblackwell 

  • Evil Overlord

#2034

This won't make much sense but:
http://wiki.eduke32.com/wiki/On_crane

...is the thing set by "lockplayer". So you can probably check in EVENT_PROCESSINPUT if that is set and then do your canceling.
1

User is offline   Zaxtor 

#2035

Crane thing and other wont work..
mouse auto aiming looks around but when I lockplayer etc, can still look and down but not around so is only up and down I need to disable.
So mouse aiming up and down is what I need to disable, it somewhat disabled diagonal, sideway etc not up and down.
it reenable looking around with mouse, weap etc after event / cutscene are over

only up and down cant figure how to disable, iv tried everything

This post has been edited by Zaxtor: 29 August 2017 - 02:22 PM

0

User is offline   Zaxtor 

#2036

UPDATE!!!
Made it work... finally, thx
0

User is offline   Mark 

#2037

Please let the rest of know what you did to solve the problem. Thanks.
0

User is offline   Zaxtor 

#2038

used the thing in
http://wiki.eduke32....NT_PROCESSINPUT

onevent EVENT_PROCESSINPUT
getinput[THISACTOR].avel turning
getinput[THISACTOR].horz mouselook

ifvarn turning 0 setinput[THISACTOR].avel 0
ifvarn mouselook 0 setinput[THISACTOR].horz 0
endevent

(actually atm using 2 comps to do that)
1 to go online, post and read etc

and other to work on duke mod v2 etc
cuz Im at my aunt on vacation and helping with her yard etc. and my comp does not support wireless internet (wifi etc)
so I use her laptop for net etc

so makes things slightly harder

This post has been edited by Zaxtor: 29 August 2017 - 06:41 PM

1

User is offline   Darkus 

#2039

How I make my bot use the 'quick kick' command with 'setinput' rather than using the 'pkick' command?

With this code, I can make my bot jump, crouch down, and press use, but for unknown reason, I can't make it use the quick kick:

onevent EVENT_PROCESSINPUT
  ifvare boting 1
  {
    ifvarg stucktime 5
    { getinput[THISACTOR].bits temp1
      ifvaror temp1 4194304
      { orvar temp1 4194304 setinput[THISACTOR].bits temp1 }
    }
  }
endevent


It's also the same thing for some commands, like activating inventory items.
0

User is online   Danukem 

  • Duke Plus Developer

#2040

View PostDarkus, on 05 October 2017 - 11:44 AM, said:

It's also the same thing for some commands, like activating inventory items.


Yeah, I have the same problem. A lot of the actions cannot be activated by setting the input bits. The most frustrating case is weapon switching, since forcing it by setting other structs can lead to glitches.

I tried setting quick_kick to 1, hoping that it would work like setting kickback_pic to 1 and cause the sequence to continue automatically. But it didn't -- you can try it and see.
1

Share this topic:


  • 115 Pages +
  • « First
  • 66
  • 67
  • 68
  • 69
  • 70
  • 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