引用 | 编辑
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); ![]() |
引用 | 编辑
glay2005
2012-03-19 20:49 |
2楼
▲ ▼ |
下面是引用 HiNess 于 2012-03-19 19:46 发表的 :那张图是代表模型范例而已0.0 我是想额外再弄个光圈特效套用到一个模型物件然后每秒执行一次( entity_set_model 但是我不晓得要如何把光圈语法写进model... ![]() ![]() |
引用 | 编辑
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() } ![]() |
引用 | 编辑
glay2005
2012-03-19 21:07 |
4楼
▲ ▼ |
现在不晓得要如何套用ITEM_MODEL
![]() 然后我想问如何利用create_blast写一个if判断是否为ITEM_MODEL来执行create_blast?? ![]() |
引用 | 编辑
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 不就可以吗 ![]() |
引用 | 编辑
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) } 不过好像无效 ![]() ![]() |