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?
|
|
06-06-2001, 11:39 PM | #2 |
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 |
|
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.
|
|
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. |
|
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. |
|
06-07-2001, 05:51 PM | #6 |
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 |
|
06-07-2001, 11:34 PM | #7 |
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. |
|
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. |
|
06-08-2001, 03:15 PM | #9 |
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 |
|
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. |
|
06-08-2001, 08:38 PM | #11 |
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 |
|
06-08-2001, 11:14 PM | #12 |
Re: Question on con coding
Why oh why can't people understand the simple concept of curly braces?
__________________
You lose. |
|
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.
|
|
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. |
|
06-09-2001, 06:18 AM | #15 |
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 |
|
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.) |
|
Bookmarks |
|
|