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

Jump to content

  • 120 Pages +
  • « First
  • 27
  • 28
  • 29
  • 30
  • 31
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   TerminX 

  • el fundador

  #841

Maybe, since "ERampage" is an unsupported hack of a really old build of EDuke32, it's possibly too old to support tilefromtexture.
0

User is offline   LAW 

#842

Well. It was my fault. I said I am new to Eduke and I made a silly mistake with using include redneck.def :)

Anyway I second my questions: Is it possible to change actor's attributes when I push the dipswitch with the same lotag?

Also is it possible to make make an RPG subweapon (like shrinker/expander) or do I have to make a separate weapon?

TerminX, as you are the author, does your newest build support the real sector over sector like in Redneck?
0

User is offline   Micky C 

  • Honored Donor

#843

About that last point, eduke32 supports a more advanced form of ROR called TROR, which works a bit differently but does the same thing, but arguably a lot better. You can read about it here: http://wiki.eduke32....m_Mapping_Guide
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#844

I would like to know, how exactly the game determines whenever the player can arm another Tripbomb while another is still close to it? Where is that value held?
0

User is offline   Jblade 

#845

I know the details are there on the wiki, but I can't really put it together so I'll ask here. How do I get the details of a wall a projectile has hit? So basically I want to know when my crossbow bolt hits a wall, what event and what variables do I use to get the details? I'd appreciate any help :(
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#846

You need to use the hitscan command, but I myself had some problems with it in the past.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#847

Does anyone know how do I get the par time of the current level, as defined by definelevelname?
0

User is offline   LAW 

#848

In RR there is a lightning sprite which is only defined in defs.con. So I have added an actor with the same name - no results. I used cactor & "setactor[THISACTOR].picnum "my sprite name" in EVENT_GAME to spawn/change my custom lightning sprite - no results. This f*cking sprite seems to disappear after the game starts. I would like to have it done without altering the map. So my question is: is it possible to force a WALL to spawn my sprite or something similar?

This post has been edited by LAW: 19 June 2012 - 12:33 PM

0

User is offline   LAW 

#849

Nobody have responded, but that's good as I did everything myself :( I feel better that way. There might be one final problem which is 'too big' for me, but I don't dare to ask :(

This post has been edited by LAW: 28 June 2012 - 01:58 PM

0

User is offline   connorius 

#850

Hello everybody,
I'm new to the community and want to learn to script with EDuke. In the past I played around with Mapster, but I want to learn to use the possibilities of EDuke to make new gameplay stuff. So I'm asking if there are any tutorials to learn the basic stuff of EDuke scripting.

I hope you can give me some advices and point me to the right direction.
1

User is offline   Hendricks266 

  • Weaponized Autism

  #851

The wiki! The Scripting page should get you started.
0

User is offline   connorius 

#852

View PostHendricks266, on 07 July 2012 - 04:03 PM, said:

The wiki! The Scripting page should get you started.

Thank you Hendricks,
I will look trough this. I have some experience with editing the user.con, but beside this I never did anything more complex with the game.con back in the days. I will try out some of the tutorials on the wiki and look how far I will come with it.
1

User is offline   OpenMaw 

  • Judge Mental

#853

I've been reading through some of the DEF/CON scripting stuff on the Eduke32 wiki to see if I could find an answer to this question, but I admit, i'm an idiot when it comes to coding. Like a full blown, brick-wall idiot, and i'm almost certain this has been asked before, but I can't find it anywhere.

Is there a way to by-pass the episode select screen, and make the game load up as if it were always going into Episode 4? (Starting with the intro and such) ? Because i'm working on a mod, and for the sake of presentation I don't want a slightly fudged over Episode Select Screen.

So it would go Main Menu --> New Game --> Difficulty --> E4 Cinematic --> "Whatever map is assigned to definelevelname 3 0"

Well, I got the game to load to the first level of the fourth episode no matter what episode you choose. That's a start. Only, it doesn't play the fourth episode intro, and you still have to go through episode select.

Anybody have any ideas? Here's my very simple code so far. :(

onevent EVENT_NEWGAME
{
startlevel 3 0
}
endevent



I noticed there's the read-only(which I assume means it's useless) variable "VOLUME" which keeps track of the current episode. Is there anyway to set the volume?

This post has been edited by Commando Nukem: 10 July 2012 - 05:42 PM

0

User is offline   Biturbo 

#854

Hello,
Im new here and im making my own mod for eduke...
But i found out i need little help with .CON scripting...
I was studying plenty of materials but still I cant make two things:

1.
I have bridge (couple of sprites) - I need move this bridge down on the ground.
So i tried movesprite and changed zvel to 3, so it was looking like this:

movesprite 176 0 0 3 CLIPMASK0 RETURN


this works exactly i need, but there is problem - anything "standing" on that moving sprite will be very jiggle/unstable, simply it doesnt go along with that sprite - except the player.
How to fix it? I tried get coordinates of object and raise the .z position, but still it doesnt work.

2.
I need make a simple camera, i dont need moving camera just show some part of map. What is best solution for this?
Should i use showview or showviewunbiased? Because i tried find camera function in original game.con and modify that, but it wasnt there...

I'd appreciate any help, thanks.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#855

View PostBiturbo, on 16 July 2012 - 03:21 AM, said:

2.
I need make a simple camera, i dont need moving camera just show some part of map. What is best solution for this?
Should i use showview or showviewunbiased? Because i tried find camera function in original game.con and modify that, but it wasnt there...

If the viewport is supposed to cover the whole screen, you should use the unbiased version: the correct screen coordinates would then be 0 0 319 199.
0

User is offline   Biturbo 

#856

View PostHelixhorned, on 16 July 2012 - 08:58 AM, said:

If the viewport is supposed to cover the whole screen, you should use the unbiased version: the correct screen coordinates would then be 0 0 319 199.


Thanks so much, its working...:(
Maybe last thing about this camera, should i disable somehow controls of player?
In my case it should work like little animation, for example, you do something like unlock door and showview show you that, which door were opened.
So should i disable controls like turn/left/up/down ?
And then, how can i revert it back? Back to the point from which player activated showview animation.

//Is showunbiased supported yet? because ive downloaded HRP polymer 5.1 & latest DukePlus, and it saying:
DukePlus/dpcons/DUKEPLUS.CON:20511: error: expected a keyword but found `showviewunbiased'.


but in old version is everything ok.

This post has been edited by Biturbo: 17 July 2012 - 07:12 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#857

Is there a way to figure out which enemy the player auto aim is targeting? I mean, I can more-or-less create a code of my own, but I wish I could return the internal actor set regardless.
0

User is offline   Micky C 

  • Honored Donor

#858

This semester I'm taking an intro to programming type course, and I think there's another one next year. The languages being looked at are matlab, visual basic, but mostly fortran. Would this be useful as a stepping stone to con code?
0

User is offline   Danukem 

  • Duke Plus Developer

#859

View PostMicky C, on 23 July 2012 - 03:36 AM, said:

The languages being looked at are matlab, visual basic, but mostly fortran. Would this be useful as a stepping stone to con code?


I suppose it would if writing code is a completely foreign concept to you. But otherwise, if you want to learn CON it would be far more efficient to do it directly. By the way it's funny to think of a real programming language as a "stepping stone" to writing CON code, since the real languages are far more useful.
0

User is offline   Jblade 

#860

Yeah if anything it's the other way round since CON is essentially really really simplified C...which is why I can use it :(
0

User is offline   Reaper_Man 

  • Once and Future King

#861

A couple of random questions:

Where is the most appropriate place to handle .htextra modifications? In-actor or in a specific event?

Is using get/setactorvar[THISACTOR].somevar a really bad idea over get/setvar somevar, or are they functionally identical? I seem to remember someone saying that the former was slower but it's been a few years.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #862

1. Outside of event-locked commands like getinput in EVENT_PROCESSINPUT and gettspr in EVENT_ANIMATESPRITES, there is no answer to your question. Put it wherever you need it to be in terms of functionality. Take a look at CON mutator#Mechanics.

2. {get,set}{actor,player}var[THISACTOR].somevar is functionally redundant with {get,set}var. The importance is when you have to access another actor or player's unique variable instance.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#863

Yes, setactorvar is meant to be used to set variables in other actors, you shouldn't use it for THISACTOR, just setvar.
0

User is offline   Reaper_Man 

  • Once and Future King

#864

It seems that htextra isn't being populated in EVENT_GAME. Here's my code, it works fine if I have it in the actual actor code, but it never seems to trigger in the event.

onevent EVENT_GAME
{
	getactor[THISACTOR].extra hptemp
	ifvarg hptemp 0
	{
		getactor[THISACTOR].htextra enemytemp
		ifvarn enemytemp -1
		{
			getactor[THISACTOR].htowner playertemp
			getplayer[THISACTOR].i playertemp2
			ifvarvare playertemp playertemp2
			{


Am I doing something totally wrong here?
0

User is offline   Danukem 

  • Duke Plus Developer

#865

I think the problem is that EVENT_GAME code is executed after the actor's code is executed. Actors typically already have a check for ifhitweapon, which resets htextra. By the time your EVENT_GAME code is executed, the damage has already been processed.

What I do is create a state and make the actors call it from their actor code, before their call to ifhitweapon.
0

User is offline   Reaper_Man 

  • Once and Future King

#866

Yeah that's what I've done for now. I was just hoping to not have to make any edits to enemy code at all, though.
0

User is offline   Danukem 

  • Duke Plus Developer

#867

View PostReaper_Man, on 26 July 2012 - 12:09 PM, said:

Yeah that's what I've done for now. I was just hoping to not have to make any edits to enemy code at all, though.


Maybe this would work?

gamevar lastextra 32767 2

onevent EVENT_GAME

ifvare sprite[THISACTOR].statnum 1
ifvarvarl sprite[THISACTOR].extra lastextra
ifvarvare sprite[THISACTOR].htowner player[THISACTOR].i
{
     // do your stuff here
}

getactor[THISACTOR].extra lastextra

endevent

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#868

But that's kind of lame, since it only checks if the health is not the same. Depending this may not properly return damage since the damage can be zero. In the end using htextra in the actor code is the better choice for all tests I have done.

If I am not wrong, the problem is that ifhitweapon command seems to do more than checking for damage, but also re-calculates it when used, so you can't use htextra after it.

====//====//====

How can I find out if music option in menu is on or off?

This post has been edited by Fox: 26 July 2012 - 01:37 PM

0

User is offline   Reaper_Man 

  • Once and Future King

#869

It's also a problem if a shot would kill an enemy and you do changes to the damage that wouldn't actually kill them, they die but then they're not dead and it kind of spazzes out. That's really unfortunate.

I also didn't realize that something like ifvarvare sprite[THISACTOR].htowner player[THISACTOR].i would work, that's useful to know.

This post has been edited by Reaper_Man: 26 July 2012 - 02:23 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#870

If you are using it inside the player actor, player[THISACTOR].i is the same as THISACTOR.
0

Share this topic:


  • 120 Pages +
  • « First
  • 27
  • 28
  • 29
  • 30
  • 31
  • 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