EDuke32 Scripting "CON coding help"
#2491 Posted 13 January 2019 - 02:18 AM
#2492 Posted 13 January 2019 - 02:28 AM
thisbecasper, on 13 January 2019 - 02:18 AM, said:
Yeah, display events are frame rate dependent and nothing that needs to be synced should ever be handled in them.
#2493 Posted 13 January 2019 - 05:37 PM
However Duke 3D carelessly handle a few animations based on frame rate updates, such as a shrunk players fists.
This post has been edited by Fox: 13 January 2019 - 05:37 PM
#2494 Posted 15 January 2019 - 07:51 AM
#2495 Posted 15 January 2019 - 07:55 AM
#2496 Posted 16 January 2019 - 11:54 PM
#2497 Posted 17 January 2019 - 06:21 AM
thisbecasper, on 12 January 2019 - 03:23 PM, said:
music 1 stalker.mid GRABBAG.mid streets.mid watrwld1.mid snake1.mid thecall.mid ahgeez.mid GRABBAG.mid streets.mid watrwld1.mid snake1.mid
even though this worked
music 1 GRABBAG.mid dethtoll.mid streets.mid watrwld1.mid snake1.mid thecall.mid ahgeez.mid dethtoll.mid streets.mid watrwld1.mid snake1.mid
and that has always been my problem. I can't play other music than dethtoll on usermaps...
I took a look at what I did for my Graveyard mod.
// Music for title and end
music 0 GAMEOVER.mid BRIEFING.MID
// Music for the individual levels
music 1 graveyardnew.ogg map2.ogg map2.ogg bonus.mid
I was able to choose whatever I wanted. I have no idea why you can't. As a test, try an older eduke32 version from a few months or a year ago.
#2498 Posted 17 January 2019 - 07:14 AM
Mark, on 17 January 2019 - 06:21 AM, said:
// Music for title and end
music 0 GAMEOVER.mid BRIEFING.MID
// Music for the individual levels
music 1 graveyardnew.ogg map2.ogg map2.ogg bonus.mid
Maybe I have to say that I'm not playing a custom episode, but rather on usermaps (so I guess thats E1L8?)
Mark, on 17 January 2019 - 06:21 AM, said:
Good point. I'm using the eduke-oldmp build, but I tried the "normal" eduke and it's the same. The songs change when I replace the filenames with others, like you showed. It still plays dethtoll on usermaps though...
This post has been edited by thisbecasper: 17 January 2019 - 07:14 AM
#2499 Posted 30 January 2019 - 01:26 AM
actor 3747 ifvarvarg sprite[THISACTOR].z 0 { setactor[THISACTOR].htbposx sprite[THISACTOR].z setactor[THISACTOR].z -100000 } else fall cstator 8192 enda
This post has been edited by Mr. Alias Nameless: 30 January 2019 - 01:26 AM
#2500 Posted 30 January 2019 - 02:06 AM
This post has been edited by Fox: 30 January 2019 - 02:06 AM
#2501 Posted 30 January 2019 - 02:43 AM
#2502 Posted 30 January 2019 - 06:07 AM
#2503 Posted 30 January 2019 - 11:19 AM
Mark, on 30 January 2019 - 06:07 AM, said:
It's not really "adjustable". What both Fox and I are saying is you can simply not have the command be executed every single game tic.
#2504 Posted 30 January 2019 - 11:41 AM
#2505 Posted 31 January 2019 - 06:21 AM
Firefly_Trooper, on 30 January 2019 - 11:41 AM, said:
Finally it will not be worth it, because I have a new unexpected problem that pisses me off My King Cobra REFUSES to die being once shrunk.
The code is posted on my thread.
This post has been edited by Firefly_Trooper: 31 January 2019 - 06:22 AM
#2506 Posted 31 January 2019 - 08:23 PM
" onevent EVENT_FIRE set RETURN -1 break
That will prevent weapon firing but quick kick is a separate function."
How would I use that so its active only while the player is in a "lockplayer" mode during a conversation with an enemy?
If it helps any, there are quotes on the top of the screen and sound clips playing during this time.
This post has been edited by Mark: 31 January 2019 - 08:30 PM
#2507 Posted 01 February 2019 - 12:25 AM
Mark, on 31 January 2019 - 08:23 PM, said:
If it helps any, there are quotes on the top of the screen and sound clips playing during this time.
For that context it would be better to use setp[].weapon_pos -9
That will force the weapon down to the bottom of the screen like you were switching weapons and not allow the player to fire. As soon as you stop setting it to -9, it will smoothly come back up.
Now let's say that quotes 150 to 155 are used for the conversation (just picking numbers at random), and are not used for other purposes. Then the following code would work in the APLAYER actor:
ifg player[].fta 0 ifge player[].ftq 150 ifle player[].ftq 155 setp[].weapon_pos -9
But it would be better to do it in the same block of code that is locking the player.
#2508 Posted 01 February 2019 - 05:50 AM
I see a potential problem. Hopefully I'm wrong. Right now the quotes in the conversation are part of the enemy actor's code and are different lengths and synced with the sound clips using ifcount for timing. The fta according to the wiki is a countdown timer for how long to display a quote. Am I going to break my existing timings by using fta?
This post has been edited by Mark: 01 February 2019 - 05:51 AM
#2509 Posted 01 February 2019 - 08:43 AM
I need this for at least 3-4 other places. I'm assuming I can reuse this line multiple times with the proper quote numbers.
Thanks again Buddy.
This post has been edited by Mark: 01 February 2019 - 12:12 PM
#2511 Posted 01 February 2019 - 11:55 AM
#2512 Posted 01 February 2019 - 12:24 PM
Mark, on 01 February 2019 - 08:43 AM, said:
I need this for at least 3-4 other places. I'm assuming I can reuse this line multiple times with the proper quote numbers.
Thanks again Buddy.
My advice is to try to organize the code better before it gets out of hand. Write a state that can be used by different enemies, which has all of the necessary code in it (none of it needs to be in the player actor). For things that change from one enemy to another, you can set one or more vars before the state is called.
#2513 Posted 01 February 2019 - 03:47 PM
This post has been edited by Mark: 01 February 2019 - 03:50 PM
#2514 Posted 01 February 2019 - 04:39 PM
#2515 Posted 01 February 2019 - 04:45 PM
But...somehow "I get by with a little help from my friends". ( a Beatles song for you youngsters )
This post has been edited by Mark: 01 February 2019 - 04:48 PM
#2516 Posted 02 February 2019 - 05:41 AM
Is it good the value "moveflags seekplayer"?
Thanks
This post has been edited by Firefly_Trooper: 02 February 2019 - 05:46 AM
#2517 Posted 06 February 2019 - 09:20 AM
Oops, forgot to mention that model is a useractor.
This post has been edited by Mark: 06 February 2019 - 09:29 AM
#2518 Posted 06 February 2019 - 10:50 AM
#2519 Posted 06 February 2019 - 10:59 AM
This post has been edited by Mark: 06 February 2019 - 11:02 AM
#2520 Posted 08 February 2019 - 12:53 PM
When run I get the error... SUBURBS.CON: In actor `DOG':
SUBURBS.CON:11559: error: `enda' not at top level within script.
I have enda at the end of this actor code just like every other actor I've ever done. Any hints what I should look for?