Seriously!

Go Back   Seriously! Forums > Serious Sam Series > Serious Sam Classic > Serious Sam Classic Workshop > Serious Sam Classic SDK

Serious Sam Classic SDK Discuss coding ideas & problems or show tutorials and code snippets.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 11-06-2003, 03:31 PM   #1   Add To Ignore List  
blahblahblah
 
--Fragman--'s Avatar
 
Joined: Feb 2002
Location: In an inexistant City
 
--Fragman-- is offline Send a message via ICQ to --Fragman-- Send a message via AIM to --Fragman-- Send a message via MSN to --Fragman--
Default Problem with enemy markers/enemy movement

I want to make an enemy go to an enemy marker I created in code.
Therefore, I first created the marker, set some properties on it, then set the m_penMarker inside the enemy to my marker, and call the procedure MoveThroughMarkers().

This somehow doesnt seem to work though.
The enemy moves for a very short moment(probably a tick), and then stops immediately...
It also seems that this only works once in game,i.e. I need to restart to get the enemy to make that very small movement again...

Anyone got any idea how to do this?

edit: I might need to add that I use a custom event in the loop in StandardBehavior(EVoid) to jump to that MoveThroughMarkers() procedure.

edit2: I used "call" instead of "jump" now to call that function, and now I can make that very short movement appear everytime, but the enemy still doesnt move to the marker.
__________________
City War City War 2 Rats Rats BTBA
--------------------------
Bomberman SS:XBOX

--------------------------
My Page!

Last edited by --Fragman--; 11-06-2003 at 04:44 PM.
  Reply With Quote
Old 11-06-2003, 05:08 PM   #2   Add To Ignore List  
G-Type Crazy
 
AverageJoe's Avatar
 
Joined: May 2002
 
AverageJoe is offline Send a message via AIM to AverageJoe
Default

did you use that idea to make a system like this:
procedure
function
code

other code
call function
__________________
The Most IMPORTANT Video You'll Ever See
The body a mountain, the mind a river, what you think of changes how you think of what you think of.
Beware of those who care or know not of happiness. Blackhole singularity.
  Reply With Quote
Old 11-06-2003, 10:31 PM   #3   Add To Ignore List  
Kamikaze
 
Joined: Oct 2003
 
artcloud is offline
Default

probably some other recent event is causing your m_penMarker to change again. make sure that all other events that sets the marker doesn't do so when you want it to go to your special marker. how did you create the marker entity in code, with CreateEntity(CLASS_ENEMYMARKER) or whatever it is and in what function or event did you create it in?

Last edited by artcloud; 11-06-2003 at 10:33 PM.
  Reply With Quote
Old 11-06-2003, 11:21 PM   #4   Add To Ignore List  
Updating Fool
 
D w K's Avatar
 
Joined: May 2002
 
D w K is offline
Default

Did you include your new class as a valid marker in EnemyBase.es 'BOOL IsTargetValid()' function?

Or you could just add your own stuff to the regular EnemyMarker.es.

The DevilMarker.es has some neat stuff in it for examples BTW.
  Reply With Quote
Old 11-07-2003, 09:48 AM   #5   Add To Ignore List  
blahblahblah
 
--Fragman--'s Avatar
 
Joined: Feb 2002
Location: In an inexistant City
 
--Fragman-- is offline Send a message via ICQ to --Fragman-- Send a message via AIM to --Fragman-- Send a message via MSN to --Fragman--
Default

No, I just used the standart enemy marker/enemy base.
I create the marker in player.es, in EFireWeapon event.

@Artcloud: Could be possible, I'll check that by adding some CPrintFs

@AJ: The procedure is now called by using an event, that seems to work best.

@DWK: I didn't modify the enemy marker class, I just need to be able to make the enemies go to a place I specify.
__________________
City War City War 2 Rats Rats BTBA
--------------------------
Bomberman SS:XBOX

--------------------------
My Page!
  Reply With Quote
Old 11-07-2003, 12:51 PM   #6   Add To Ignore List  
blahblahblah
 
--Fragman--'s Avatar
 
Joined: Feb 2002
Location: In an inexistant City
 
--Fragman-- is offline Send a message via ICQ to --Fragman-- Send a message via AIM to --Fragman-- Send a message via MSN to --Fragman--
Default

I got it to work partially by removing one call to Inactive() in enemybase, which somehow stopped the movement...
However, the enemy still doesn't move if the marker is near the enemy, I'd like the enemy to walk exactly where I told it to walk to.
Guess I'll need to mess a bit with the marker movement then.
__________________
City War City War 2 Rats Rats BTBA
--------------------------
Bomberman SS:XBOX

--------------------------
My Page!
  Reply With Quote
Old 11-07-2003, 05:31 PM   #7   Add To Ignore List  
Updating Fool
 
D w K's Avatar
 
Joined: May 2002
 
D w K is offline
Default

Just keep pounding on it you'll get it

Don't forget the Watcher class, it more or less controls EnemyBase, by sending a bunch of events to EnemyBase.
  Reply With Quote
Old 11-08-2003, 10:10 AM   #8   Add To Ignore List  
blahblahblah
 
--Fragman--'s Avatar
 
Joined: Feb 2002
Location: In an inexistant City
 
--Fragman-- is offline Send a message via ICQ to --Fragman-- Send a message via AIM to --Fragman-- Send a message via MSN to --Fragman--
Default

Yeah....
Seems to work relatively fine now, though some enemies are still a bit strange..

I'm wondering, would I be allowed to modify the .mdl files and redistribute them? I need bigger collision boxes...
__________________
City War City War 2 Rats Rats BTBA
--------------------------
Bomberman SS:XBOX

--------------------------
My Page!
  Reply With Quote
Old 11-08-2003, 05:03 PM   #9   Add To Ignore List  
Updating Fool
 
D w K's Avatar
 
Joined: May 2002
 
D w K is offline
Default

Not without permission I'd think.

You might be able to do that in the code though. I think there is a way, I'd have to check into it though. They do that with the projectiles, I do know that, and in CannonBall.es.
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Mod] InSamnity! 2 / Parse Error 2 is now ready for your playing pleasure. D w K Serious Sam 2 Workshop 1681 02-20-2013 06:26 AM
Freaky Sound Problem Walt Off Topic Forum 14 08-07-2003 05:39 AM
Murphy's Laws of Combat Operations EpShot Off Topic Forum 4 05-29-2003 05:06 AM
using an enemy as matrix cam target danilojo Serious Sam Classic SDK 2 12-11-2001 08:15 PM


All times are GMT -4. The time now is 11:31 AM.