DaNy3LL 21 Posted September 23, 2014 Share Posted September 23, 2014 Hello guys, how can I make the players no longer block each other on OX map ? For example if you try to move from X to O and someone is in front on you, you can't go forward I guess I need a function for that ... Can someone help me ? Kind Regards, DaNy3LL Link to comment Share on other sites More sharing options...
Night 366 Posted September 23, 2014 Share Posted September 23, 2014 i don t rly know what no longer collide means and google translatore isnt very relable so i gess you want them to be able to hit one another right ? Link to comment Share on other sites More sharing options...
Chun-Chun 60 Posted September 23, 2014 Share Posted September 23, 2014 i don t rly know what no longer collide means and google translatore isnt very relable so i gess you want them to be able to hit one another right ? No, he wants to make the players to be able to walk without geting blocked by another player.( for example you are char w, and while in ox you want to move from x to o, but you can't because there are to many players, so if you make so players could walk through eachother, they won't get blocked anymore) 1 Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 23, 2014 Author Share Posted September 23, 2014 i don t rly know what no longer collide means and google translatore isnt very relable so i gess you want them to be able to hit one another right ? No, he wants to make the players to be able to walk without geting blocked by another player.( for example you are char w, and while in ox you want to move from x to o, but you can't because there are to many players, so if you make so players could walk through eachother, they won't get blocked anymore) Yes, that's actually what I tried to say Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 24, 2014 Author Share Posted September 24, 2014 *BUMP* Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 26, 2014 Author Share Posted September 26, 2014 *BUMP* Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 27, 2014 Author Share Posted September 27, 2014 *BUMP* Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 28, 2014 Author Share Posted September 28, 2014 *BUMP* Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 30, 2014 Author Share Posted September 30, 2014 *BUMP* Link to comment Share on other sites More sharing options...
Ken 904 Posted September 30, 2014 Share Posted September 30, 2014 Hello guys, how can I make the players no longer block each other on OX map ? For example if you try to move from X to O and someone is in front on you, you can't go forward I guess I need a function for that ... Can someone help me ? Kind Regards, DaNy3LL You mean "Follow the problem" everyone is follow each other. You can make this with source file. Best Regards Ellie Do not be sorry, be better. Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 30, 2014 Author Share Posted September 30, 2014 Can you give me an advice on how can I do it ? Link to comment Share on other sites More sharing options...
Think 117 Posted September 30, 2014 Share Posted September 30, 2014 Yes. CInstanceBase::CheckAdvancing() is your friend. There you have to check for OX map, make it ignore a certain set of collisions and allow the player to advance. Speaking of which, computing collisions is one of the most complex things in the game. Don't go deeper than this function, it's not worth it, and a bit of tweaking here should be enough. Don't be discouraged by all that weird code and DX vectors and give it a try! Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted September 30, 2014 Author Share Posted September 30, 2014 And how can I check for a specific map ? I guess it's not something like the in-game function pc.get_map_index() Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted October 2, 2014 Author Share Posted October 2, 2014 *BUMP* Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted October 4, 2014 Author Share Posted October 4, 2014 *BUMP* Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted October 21, 2014 Author Share Posted October 21, 2014 I tried something like this in CInstanceBase::CheckAdvancing() with return FALSE and return TRUE but it doesn't work std::string strMapName = CPythonBackground::Instance().GetWarpMapName(); if (strMapName == "metin2_map_oxevent") { BlockMovement(); return TRUE; } Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted October 27, 2014 Author Share Posted October 27, 2014 BUMP Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted November 2, 2014 Author Share Posted November 2, 2014 BUMP Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted November 7, 2014 Author Share Posted November 7, 2014 BUMP Link to comment Share on other sites More sharing options...
asdfghjkesha 98 Posted November 7, 2014 Share Posted November 7, 2014 You should check how guild war spectate works I think there would be some info about this & "following each other" problem because in guild war, as I remember, you can't see spectators so you can walk without being blocked. Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted November 9, 2014 Author Share Posted November 9, 2014 BUMP Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted November 19, 2014 Author Share Posted November 19, 2014 BUMP Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted March 22, 2015 Author Share Posted March 22, 2015 BUMP Link to comment Share on other sites More sharing options...
Think 117 Posted March 22, 2015 Share Posted March 22, 2015 Wow that's a long bump! BlockMovement(); return TRUE; You did BlockMovement(), which is basically the thing that blocks the movement. Maybe you'd want to remove that Link to comment Share on other sites More sharing options...
DaNy3LL 21 Posted March 22, 2015 Author Share Posted March 22, 2015 Yeah ... Basically I was doing something related to the oxevend and remembered about this Tried without BlockMovement(); but still doesn't work This is how my CheckAdvancing() looks like (tried with both return TRUE and return FALSE) BOOL CInstanceBase::CheckAdvancing() { #ifdef __MOVIE_MODE__ if (IsMovieMode()) return FALSE; #endif std::string strMapName = CPythonBackground::Instance().GetWarpMapName(); if (strMapName == "metin2_map_oxevent") { //BlockMovement(); return TRUE; } if (!__IsMainInstance() && !IsAttacking()) { if (IsPC() && IsWalking()) { CPythonCharacterManager& rkChrMgr=CPythonCharacterManager::Instance(); for(CPythonCharacterManager::CharacterIterator i = rkChrMgr.CharacterInstanceBegin(); i!=rkChrMgr.CharacterInstanceEnd();++i) { CInstanceBase* pkInstEach=*i; if (pkInstEach==this) continue; if (!pkInstEach->IsDoor()) continue; if (m_GraphicThingInstance.TestActorCollision(pkInstEach->GetGraphicThingInstanceRef())) { BlockMovement(); return true; } } } return FALSE; } if (m_GraphicThingInstance.CanSkipCollision()) { //Tracenf("%x VID %d Ă浹 ˝şĹµ", ELTimer_GetMSec(), GetVirtualID()); return FALSE; } BOOL bUsingSkill = m_GraphicThingInstance.IsUsingSkill(); m_dwAdvActorVID = 0; UINT uCollisionCount=0; CPythonCharacterManager& rkChrMgr=CPythonCharacterManager::Instance(); for(CPythonCharacterManager::CharacterIterator i = rkChrMgr.CharacterInstanceBegin(); i!=rkChrMgr.CharacterInstanceEnd();++i) { CInstanceBase* pkInstEach=*i; if (pkInstEach==this) continue; CActorInstance& rkActorSelf=m_GraphicThingInstance; CActorInstance& rkActorEach=pkInstEach->GetGraphicThingInstanceRef(); //NOTE : SkilŔ» ľ˛´ő¶óµµ Door Type°ú´Â CollisionĂĽĹ© ÇŃ´Ů. if( bUsingSkill && !rkActorEach.IsDoor() ) continue; // ľŐŔ¸·Î ŔüÁřÇŇĽö Ŕִ°ˇ? if (rkActorSelf.TestActorCollision(rkActorEach)) { uCollisionCount++; if (uCollisionCount==2) { rkActorSelf.BlockMovement(); return TRUE; } rkActorSelf.AdjustDynamicCollisionMovement(&rkActorEach); if (rkActorSelf.TestActorCollision(rkActorEach)) { rkActorSelf.BlockMovement(); return TRUE; } else { NEW_MoveToDestPixelPositionDirection(NEW_GetDstPixelPositionRef()); } } } // ¸ĘĽÓĽş ĂĽĹ© CPythonBackground& rkBG=CPythonBackground::Instance(); const D3DXVECTOR3 & rv3Position = m_GraphicThingInstance.GetPosition(); const D3DXVECTOR3 & rv3MoveDirection = m_GraphicThingInstance.GetMovementVectorRef(); // NOTE : ¸¸ľŕ Ŕ̵ż °Ĺ¸®°ˇ Ĺ©´Ů¸é ÂÉ°łĽ ±¸°Ł ş°·Î ĽÓĽşŔ» ĂĽĹ©ÇŘ ş»´Ů // ÇöŔç ĽłÁ¤ÇŘ łőŔş 10.0f´Â ŔÓŔÇŔÇ °Ĺ¸® - [levites] int iStep = int(D3DXVec3Length(&rv3MoveDirection) / 10.0f); D3DXVECTOR3 v3CheckStep = rv3MoveDirection / float(iStep); D3DXVECTOR3 v3CheckPosition = rv3Position; for (int j = 0; j < iStep; ++j) { v3CheckPosition += v3CheckStep; // Check if (rkBG.isAttrOn(v3CheckPosition.x, -v3CheckPosition.y, CTerrainImpl::ATTRIBUTE_BLOCK)) { BlockMovement(); //return TRUE; } } // Check D3DXVECTOR3 v3NextPosition = rv3Position + rv3MoveDirection; if (rkBG.isAttrOn(v3NextPosition.x, -v3NextPosition.y, CTerrainImpl::ATTRIBUTE_BLOCK)) { BlockMovement(); return TRUE; } return FALSE; } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now