
EDuke32 Scripting "CON coding help"
#2360 Posted 01 October 2018 - 03:04 PM
This is a good example of what I was up against early in my con code learning. There are many just like this.
The command seems very simple. Fill in a number for a sector and a sector tag. But where do I get those numbers from? It can't be as easy as taking the sector number shown in Mapster because those numbers are dynamic and can change. That leads me to believe there are more con commands that need to be included to get those 2 numbers to enter and to make use of the command. If so, the wiki should explain it right there and provide a small example.
This post has been edited by Mark: 01 October 2018 - 03:06 PM
#2361 Posted 01 October 2018 - 03:05 PM
Trooper Dan, on 01 October 2018 - 02:49 PM, said:
my vote is for eDuke64
#2362 Posted 01 October 2018 - 03:08 PM
#2363 Posted 01 October 2018 - 03:17 PM
Hendricks266, on 01 October 2018 - 02:39 PM, said:
there should be - nuances and all.
It's something a lot of first time script modders aspire to do. That and new enemies. Modified huds and equipment items are probably high on the wish-list as well.
I find it strange that after all these years, nobody has put together an extensive how-to for eduke32 script modding.
If I had two brain cells to rub together I would have got into scripting instead of making crappy maps.
#2364 Posted 01 October 2018 - 03:20 PM
December Man, on 01 October 2018 - 02:22 PM, said:
https://zdoom.org/wi...ction_functions
Notice that each one has an example of how to use it within the code, even if they seem redundant at times. There are a few exceptions with no examples, but these have this note added:
Furthermore, many new functions e.g. events have no pages added. Notice how many hyperlinks are red here:
https://wiki.eduke32...wiki/Event_list
I guess I can assume which some of them do, but having clear verified info about it would save a lot of time.
Mark, on 01 October 2018 - 03:04 PM, said:
This is a good example of what I was up against early in my con code learning. There are many just like this.
The command seems very simple. Fill in a number for a sector and a sector tag. But where do I get those numbers from? It can't be as easy as taking the sector number shown in Mapster because those numbers are dynamic and can change. That leads me to believe there are more con commands that need to be included to get those 2 numbers to enter and to make use of the command. If so, the wiki should explain it right there and provide a small example.
Looks to me you guys just volunteered to update that wiki.
Just ask questions here, and once settled, add to the wiki.

This post has been edited by Hank: 01 October 2018 - 03:21 PM
#2365 Posted 01 October 2018 - 03:20 PM
Hendricks266, on 01 October 2018 - 03:08 PM, said:
I wouldn't call it forking. I would all it rolling out a new model and not worrying about backwards compatibility.
This post has been edited by Forge: 01 October 2018 - 03:21 PM
#2366 Posted 01 October 2018 - 03:25 PM
This post has been edited by Mark: 01 October 2018 - 03:27 PM
#2367 Posted 01 October 2018 - 03:25 PM
Hank, on 01 October 2018 - 03:20 PM, said:
Just ask questions here, and once settled, add to the wiki.

second that motion. take it to a vote.
Mark, on 01 October 2018 - 03:25 PM, said:
wrong info can be updated and fixed. it's a start.
This post has been edited by Forge: 01 October 2018 - 03:26 PM
#2369 Posted 01 October 2018 - 03:31 PM
Mark, on 01 October 2018 - 03:29 PM, said:

too late

there's more than one way to get results in script.
same as making a sloped sector in mapster - depends on which wall is the first wall. Opposite opposing walls of equal angles get the same result & both ways can be explained.
This post has been edited by Forge: 01 October 2018 - 03:34 PM
#2370 Posted 01 October 2018 - 03:36 PM
An example popped into my head. In Mapster I made it so a sound plays when the player enters a certain sector. Later on I wanted some more stuff to happen at the same time. I had recently looked in the wiki about game events. I decided to use an event to watch for when that sound played and then run my little block of code. It worked fine but for reasons I have forgotten, I was told it wasn't the proper way to accomplish my goal. So I'm afraid of putting more of that kind of thing in the wiki.
This post has been edited by Mark: 01 October 2018 - 03:50 PM
#2371 Posted 01 October 2018 - 03:38 PM
Forge, on 01 October 2018 - 03:17 PM, said:
It's something a lot of first time script modders aspire to do. That and new enemies. Modified huds and equipment items are probably high on the wish-list as well.
I feel somewhat responsible for this, especially since I started a tutorial on making new enemies and then didn't finish it (although I still could). I have two excuses, and neither of them is very good. The first excuse is that time spent writing the tutorial is coming straight out of the time I would otherwise be spending getting a project closer to release (recently that has been AA and now an AA update). The second excuse is that, with both enemies and weapons, it's better for the tutorial if it's as generic as possible. But I'm not interested in making generic enemies and weapons. So I would have to make a special, more generic enemy or weapon just for the purpose of the tutorial.
The reason why non-generic is bad is it always involves bringing in techniques and features that will be confusing as hell to someone trying to learn. If you look at the aforementioned enemy tutorial that I stopped working on, that was pretty much the reason. It was getting to the part on the cyber-enforcer where I would have to explain how to make it jump from long distance onto its target.
#2372 Posted 01 October 2018 - 03:39 PM
Mark, on 01 October 2018 - 03:36 PM, said:
technically you won't be 'wrong', or 'stupid'. Just inefficient.
Inefficient is better than none.
Again. the information can be updated.

#2373 Posted 01 October 2018 - 03:47 PM
Trooper Dan, on 01 October 2018 - 03:38 PM, said:
Start with the base generic script
make an advanced section and update sporadically when it's convenient or a question gets answered.
#2374 Posted 01 October 2018 - 03:54 PM
#2375 Posted 01 October 2018 - 04:12 PM
Mark, on 01 October 2018 - 03:54 PM, said:
If you don't want to do it, don't do it. Nobody else is stepping up, so you're in good company.
#2376 Posted 01 October 2018 - 04:31 PM
Hendricks266, on 01 October 2018 - 01:18 PM, said:
Was Lua meant to be the solution? Helixhorned gave the impression that it was going to be a sort of clean slate for coding, in addition to the con system.
If so, would that system be worked on and finished at some point?
This post has been edited by Micky C: 01 October 2018 - 04:31 PM
#2377 Posted 01 October 2018 - 04:50 PM
Micky C, on 01 October 2018 - 04:31 PM, said:
If so, would that system be worked on and finished at some point?
Lunatic was fundamentally misplaced. Helixhorned wanted to rewrite Duke 3D's game logic in Lua, and Lua would suck for that purpose. It's on the to-do list to torch all of Lunatic except the language bindings.
#2378 Posted 01 October 2018 - 05:10 PM
#2379 Posted 01 October 2018 - 05:48 PM
Like for duke, purplelava, ordinarylava, slime hurts you.
but is there a code to make if a monster walks into a sector(number) or floor tile(number) it kills them etc?
So I can make if a monster falls into the lava (accidentally) or etc, they die
#2380 Posted 01 October 2018 - 08:57 PM
iffloordistl 1 // if on the ground { getsector[THISACTOR].floorpicnum TEMP // the sector's floor tile ifvare TEMP MYHURTTILE // MYHURTILE should be whatever tile number you want to hurt the enemy { getactor[THISACTOR].extra TEMP // extra is enemy health ifvarg TEMP 0 subvar TEMP 1 setactor[THISACTOR].extra TEMP } }
would probably do it for a quick and dirty version.
#2381 Posted 01 October 2018 - 09:45 PM
setactor[THISACTOR].htextra 1 setactor[THISACTOR].htpicnum MYHURTILE
Setting htpicnum isn't really necessary, but it could be useful because it will make ifwasweapon return the lava picnum.
#2382 Posted 01 October 2018 - 10:10 PM
Actor died when he gets (near the killable floor) diff height or not. (like in red line or between the 2 sectors). so translated, he dies without touching the lavafloor except if he flies over it.
lavasector is a mask based floor (one seen in the pics I posted on the thread of my map im working on)
So I changed it into "getsector[THISACTOR].ceilingpicnum TEMP"
and tile numb in var below etc
And when he falls inside the killable sector (lava sector with lava ceiling) he dies cuz of the "hurtable ceiling" inside the lava sector.
This post has been edited by Zaxtor: 01 October 2018 - 10:11 PM
#2383 Posted 02 October 2018 - 03:57 AM
Hank, on 01 October 2018 - 03:20 PM, said:
Just ask questions here, and once settled, add to the wiki.

That'd be great... if I knew what these events even do.
#2384 Posted 03 October 2018 - 08:49 AM
This post has been edited by thisbecasper: 03 October 2018 - 09:32 AM
#2385 Posted 03 October 2018 - 01:14 PM
Trooper Dan, on 30 September 2018 - 03:18 PM, said:

Trooper Dan, on 29 September 2018 - 06:59 AM, said:
But I found another way to do it: spawning two invisible sprites when the player exits the car and moving one to the left and the other to the right. If one of them hits a wall, I delete it, and then I set the player position to one of those sprites, preferably to the left unless the sprite was deleted.
#2386 Posted 07 October 2018 - 08:32 AM
#2387 Posted 07 October 2018 - 10:43 AM
#2388 Posted 07 October 2018 - 11:26 AM
Hendricks266, on 07 October 2018 - 10:43 AM, said:
In 5 out of 6 places it is used in newbeastcode when they die. The sixth place is when one player gets revived by another, then he calls randvar and uses it to speak a random line (is that what you mean by one duke calling it different amount of times than another, in one tick?) Or else I'm afraid you'll have to elaborate what you mean with "different hosts". Very helpful response indeed!
This post has been edited by thisbecasper: 07 October 2018 - 11:27 AM