Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Duke Nukem > Duke Nukem 3D Modifications

Notices

 
 
Thread Tools
Old 06-06-2001, 11:02 PM   #1
Question on con coding
I've been working with a piece of useractor code that needs to check if Duke is moving, but ifp pwalking does not seem to trigger the actor. Is this primitive only usable within the APLAYER structure or does it need to be written differently when being called from another actor?
WhyteTyger is offline  
Old 06-06-2001, 11:39 PM   #2

Mblackwell's Avatar
Re: Question on con coding
ifp pwalking, AND ifp prunning should probably both be tested. You may be in run mode.
__________________
I don't wanna be like other people are
Don't wanna own a key, don't wanna wash my car
Don't wanna have to work like other people do
I want it to be free, I want it to be true

Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus
Mblackwell is offline  
Old 06-07-2001, 12:10 AM   #3
Re: Question on con coding
Thanks for the suggestion. I probably should have put both checks in the code, but I had a feeling that wasn't my problem... and I was right. At the moment, I have the actor set to play a "test sound" when the code is activated. So far nothing.
WhyteTyger is offline  
Old 06-07-2001, 05:46 AM   #4
Re: Question on con coding
It would be helpful if you could post the snippet of code in question... Might be something as simple as a missing set of { }.
__________________
How do you expect anyone to remember your name, if you can't spell it right yourself, Broussard? It's basic positioning... None of that matters... It'll be done when it's done.... It's the spirit of the law, not the letter.
Bruce Hamilton is offline  
Old 06-07-2001, 04:47 PM   #5
Re: Question on con coding
Heh, I can see your point. No, the sound itself is defined and coded right... I'm sure it's the code itself that isn't being called... I don't have access to the exact code right now so I'll try to do this from memory....

useractor notenemy WEAK
fall
ifcansee
ifpdistl 3072
ifp pwalking
sound MYSOUND
else ifp prunning
sound MYSOUND
enda

I'm attempting to have an actor play a sound if the player is a certain distance away and is running or walking. If the code is sloppy or (as I fear) incorrect, I am still learning and appreciate any feedback on this.
WhyteTyger is offline  
Old 06-07-2001, 05:51 PM   #6

Mblackwell's Avatar
Re: Question on con coding
__________________
I don't wanna be like other people are
Don't wanna own a key, don't wanna wash my car
Don't wanna have to work like other people do
I want it to be free, I want it to be true

Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus
Mblackwell is offline  
Old 06-07-2001, 11:34 PM   #7

cyborg's Avatar
Re: Question on con coding
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by WhyteTyger:
Thanks for the suggestion. I probably should have put both checks in the code, but I had a feeling that wasn't my problem... and I was right. At the moment, I have the actor set to play a "test sound" when the code is activated. So far nothing.<HR></BLOCKQUOTE>

Use quotes - otherwise I'll assume first that you screwed up the sound, second that you screwed up the actual code that's supposed to activate it.
__________________
You lose.
cyborg is offline  
Old 06-08-2001, 02:16 PM   #8
Re: Question on con coding
Not to be rude or start a flame war, Cyborg, but I did say I didn't have access to the exact code... I know my C+ programming and the syntax involved. I was a little rushed with the last post.

Thanks for the reply, MBlackwell, though it still doesn't seem to be working... I rewrote the actor code on a newly extracted Game con and everything is fine until the code checks for ifp prunning or ifp pwalking. Still not sure what's happening.
WhyteTyger is offline  
Old 06-08-2001, 03:15 PM   #9

Mblackwell's Avatar
Re: Question on con coding
The problem is a typo in my code
I put "ifp running" instead of "ifp prunning". But that shouldn't have been a hard mistake to figure out.
__________________
I don't wanna be like other people are
Don't wanna own a key, don't wanna wash my car
Don't wanna have to work like other people do
I want it to be free, I want it to be true

Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus
Mblackwell is offline  
Old 06-08-2001, 03:50 PM   #10
Re: Question on con coding
Yes, I noticed the typo in the code and corrected it when I did the rewrite (before the last post).

At this point, the code still does not work. I am trying some other solutions as well.
WhyteTyger is offline  
Old 06-08-2001, 08:38 PM   #11

Mblackwell's Avatar
Re: Question on con coding
Yer sounds should be 11Khz or lower, and 8bit Mono. Using "Sound Recorder" to convert it doesn't work. At this point I'd have to say something like that is the problem.
__________________
I don't wanna be like other people are
Don't wanna own a key, don't wanna wash my car
Don't wanna have to work like other people do
I want it to be free, I want it to be true

Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus
Mblackwell is offline  
Old 06-08-2001, 11:14 PM   #12

cyborg's Avatar
Re: Question on con coding
Why oh why can't people understand the simple concept of curly braces?
__________________
You lose.
cyborg is offline  
Old 06-09-2001, 01:17 AM   #13
Re: Question on con coding
That's what I thought too... but the sounds play fine outside the code. So, I tried using quotes to check the if statements and make sure they were being executed... and they aren't... It's like that portion of the code is being bypassed. Very strange.
WhyteTyger is offline  
Old 06-09-2001, 05:37 AM   #14
Re: Question on con coding
I think the problem may be the order of your if statements... You've got it checking the player distance after checking if player can see the target, try checking the distance first.
__________________
How do you expect anyone to remember your name, if you can't spell it right yourself, Broussard? It's basic positioning... None of that matters... It'll be done when it's done.... It's the spirit of the law, not the letter.
Bruce Hamilton is offline  
Old 06-09-2001, 06:18 AM   #15

Mblackwell's Avatar
Re: Question on con coding
Most likely it'd be able to see the player b4 the player is a given distance away (like, put the thing in an open room or whatnot). But, have you played the sounds inside Duke, with some DIFFERENT code. Just put the actor's code as "soundonce MYSOUND" and commment the rest out for now. If the sound doesn't play.... the problem is yer sound.
__________________
I don't wanna be like other people are
Don't wanna own a key, don't wanna wash my car
Don't wanna have to work like other people do
I want it to be free, I want it to be true

Eduke32.com : The Rejected Applications : The Meadhall of the Comitatus
Mblackwell is offline  
Old 06-09-2001, 01:09 PM   #16
Re: Question on con coding
Yes, the sounds actually do play fine within Duke. I appreciate all the help and suggestions you guys have given me, but it's really a moot point now.

After a marathon night of coding, I actually got it to work in EDuke exactly how I wanted it to (compared with about a week of Atomic coding, heh.)
WhyteTyger is offline  
 

Bookmarks
-->

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:35 PM.

Page generated in 0.12929511 seconds (100.00% PHP - 0% MySQL) with 18 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.
-->