By the way whats the status on the fire extinguisher ?!?
Forum
Carnage Contest Lua Scripts/Questions/HelpBy the way whats the status on the fire extinguisher ?!?
invisible objects: yes, that's possible. you have to use Lua scripted objects for that (see shield generator or explosives script). just don't do anything in the object draw function!
BUT: blood splatter, craters and other effects can not be rendered to invisible objects. that's technically not possible in carnage contest. they can only be rendered to terrain and terrain is always non-transparent.
loooser:
indirectly. you can use getframe in combination with the modulo operator so your action is executed every 50 frames (50 frames = second). use this in your update function:
1
2
3
2
3
if (getframe()%50)==0 then 	-- your actions here end
But does that also work for gamemodes?
by they way:
is there also a hook for end turn or better start turn?
how to make terrain indestructible?
loooser has written
Thank you, for the information
But does that also work for gamemodes?
by they way:
is there also a hook for end turn or better start turn?
how to make terrain indestructible?
But does that also work for gamemodes?
by they way:
is there also a hook for end turn or better start turn?
how to make terrain indestructible?
It does, all lua commands work in GAmeModes, so you can poosible make flying greands that explode on caontact! tha would be cool
EDIT: DC has implemented somehting, not sure thogh. I might be dreaming.
and how to play sound once ?
1
projectiles[id].ignore=playercurrent()
@Vectar666 - thank you, it was by speed that i made ^^.
Chack playery and watery, if they are close, push player by absolute, push x=getplayerxspeed(i), push y=-getplayeryspeed(i)
where i is for loop variable.
damn there is no button to delete posts. Some idea came in my mind after like 1-2 min's after i post it. But i didnt thought about "push x=getplayerxspeed(i)"
how do i find out what type an object has (the object is not in the same script) that is not an default object and has been created by an other script?
because i want to make that a weapon only attacks one special object ,and the only way to find this object is with the type
here is an example
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
--Here i try to find an object with this type but i dont know what i have to write as type allobjects=objecttable() for i=1,#allobjects do if getobjecttype(allobjects[i])==cc.heli.object.id then -- now what do i write instead of cc.heli.object.id --or where do i find the type --do something end end
also some questions are:
Is the type a number or what else?
in the cc page you can find this info for objecttable()
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
objecttable([TYPE=0]) Parameters:	 [TYPE=0] - list objects of this type only (0 for all types) Returns:	 OBJECT TABLE - a table containing object IDs Returns a table/array which contains the IDs of objects in the game. By default all object types are included. Use another value for TYPE to get a table which only contains objects of a certain type.
what do i have to write objecttable(here) if i only what objects with this type?
ps i hope you understand what i meant
edited 7×, last 23.08.11 02:33:03 pm
simply use this variable for objecttable or whereever you have to use the object type id.
also is there a way to use varialbes from a other weapon script?
but be careful: you shouldn't try to access variables from other weapons directly when the script is loaded (outside a CC function). this might lead to problems.
and you should also check if the used table is ~= nil because otherwise your script will cause a bug when the other weapon/object is currently not in the weaponset.
edited 1×, last 23.08.11 04:40:58 pm
i didnt find it
is there a way to make a ai/bot hud position a weapon?
edited 3×, last 29.08.11 10:25:44 am