引用 | 編輯
HiNess
2012-03-19 19:46 |
1樓
▲ ▼ |
你應該是說set_user_rendering吧...
複製程式 /* Sets player rendering mode. */ native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16); x0 |
引用 | 編輯
glay2005
2012-03-19 20:49 |
2樓
▲ ▼ |
下面是引用 HiNess 於 2012-03-19 19:46 發表的 :那張圖是代表模型範例而已0.0 我是想額外再弄個光圈特效套用到一個模型物件然後每秒執行一次( entity_set_model 但是我不曉得要如何把光圈語法寫進model... x0 |
引用 | 編輯
andyt0621
2012-03-19 20:55 |
3樓
▲ ▼ |
複製程式
set_task(間隔秒數, "create_blast", id, _, _, "b") public create_blast(id) { new Float:originF[3] pev(id, pev_origin, originF) // Largest ring (大的光環) engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_BEAMCYLINDER) // TE id (TE 的代碼) engfunc(EngFunc_WriteCoord, originF[0]) // x (X 座標) engfunc(EngFunc_WriteCoord, originF[1]) // y (Y 座標) engfunc(EngFunc_WriteCoord, originF[2]) // z (Z 座標) engfunc(EngFunc_WriteCoord, originF[0]) // x axis (X 軸) engfunc(EngFunc_WriteCoord, originF[1]) // y axis (Y 軸) engfunc(EngFunc_WriteCoord, originF[2]+840) // z axis (Z 軸)640 write_short(g_shockwaveSpr) // sprite (Sprite 物件代碼) write_byte(0) // startframe (幀幅開始) write_byte(0) // framerate (幀幅頻率) write_byte(3) // life (時間長度) write_byte(30) // width (寬度) write_byte(0) // noise (響聲) write_byte(130) // red (顏色 R) write_byte(139) // green (顏色 G) write_byte(253) // blue (顏色 B) write_byte(200) // brightness (顏色亮度) write_byte(0) // speed (速度) message_end() } x0 |
引用 | 編輯
glay2005
2012-03-19 21:07 |
4樓
▲ ▼ |
現在不曉得要如何套用ITEM_MODEL
然後我想問如何利用create_blast寫一個if判斷是否為ITEM_MODEL來執行create_blast?? x0 |
引用 | 編輯
andyt0621
2012-03-19 21:53 |
5樓
▲ ▼ |
下面是引用 glay2005 於 2012-03-19 21:07 發表的 : ITEM_MODEL <--指entity嗎 -.-? 如果不是人物..參考zp // Infection Bomb: Green Blast 開頭是這句的 engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) (是問這個嗎?) 判斷那裡.. 你用 EV_SZ_classname 不就可以嗎 x1 |
引用 | 編輯
glay2005
2012-03-19 23:09 |
6樓
▲ ▼ |
下面是引用 andyt0621 於 2012-03-19 21:53 發表的 : 複製程式 public item_ring(entity) { new classname[32] pev(entity,pev_classname,classname,31) if (!equal(classname,"ITEM_MODEL")) return; // Get player origin static Float:originF[3] pev(entity, pev_origin, originF) engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_BEAMCYLINDER) engfunc(EngFunc_WriteCoord, originF[0]) // x (X 座標) engfunc(EngFunc_WriteCoord, originF[1]) // y (X 座標) engfunc(EngFunc_WriteCoord, originF[2]) // z (Y 座標) engfunc(EngFunc_WriteCoord, originF[0]) // x axis (X 軸) engfunc(EngFunc_WriteCoord, originF[1]) // y axis (Y 軸) engfunc(EngFunc_WriteCoord, originF[2]+50.0) // z axis (Z 軸) write_short(g_beacon_Sprite) write_byte(0)// startframe (幀幅開始) write_byte(1)// framerate (幀幅頻率) write_byte(30)//life (時間長度) write_byte(5)// width (寬度) write_byte(0)// noise (響聲) write_byte(100)// red (顏色 R) write_byte(100)// green (顏色 G) write_byte(0)// blue (顏色 B) write_byte(100)// brightness (顏色亮度) write_byte(1)// speed (速度) message_end() set_task(2.0, "item_ring", entity) } public DROP_ITEM(victim) { entity_set_string(item, EV_SZ_classname, ITEM_NAME); entity_set_int(item, EV_INT_solid, SOLID_TRIGGER); new Float:vAim[3], Float:vOrigin[3]; entity_get_vector(victim, EV_VEC_origin, vOrigin); VelocityByAim(victim, random_num(2, 4), vAim); vOrigin[0] += 50.0; vOrigin[1] += vAim[1]; vOrigin[2] += 30.0; entity_set_model(item, ITEM_MODEL); entity_set_size(item, Float:{-2.5, -2.5, -1.5}, Float:{2.5, 2.5, 1.5}); entity_set_int(item, EV_INT_movetype, 6); entity_set_vector(item, EV_VEC_origin, vOrigin); item_ring(item) } 不過好像無效 x0 |